WP PLUGIN アーカイブページの投稿表示順設定
・不要な初期化を削除 ・カスタムタクソノミー対応 ・設定画面のタブ化 ・設定画面各タクソノミーの投稿リスト表示をメソッド化 ・name属性の閉じ忘れ修正 ・不要なreturn削除 ・APOP_UI::create_product_none_order_list() returnに変数が未設定の場合の条件を追加 ・readmeに若干加筆
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* TODO:設定対象にカスタムタクソノミーの投稿リストを作成する
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
} // Exit if accessed directly
|
||||
@@ -64,15 +60,27 @@ if ( ! class_exists( 'APOP' ) ) {
|
||||
|
||||
|
||||
public function show_option_page() {
|
||||
|
||||
if ( isset( $_POST['_apop_post_category'] ) || isset( $_POST['_apop_post_post_tag'] ) ) {
|
||||
//カテゴリーの投稿表示順設定
|
||||
if ( isset( $_POST['_apop_post_category'] ) ) {
|
||||
check_admin_referer( 'sh_options' );
|
||||
//投稿表示順の設定
|
||||
$this->update_post_sort( 'category' );
|
||||
require_once self::TEMPLATE_DIR . 'success.php';
|
||||
}
|
||||
|
||||
//タグの投稿表示順設定
|
||||
if ( isset( $_POST['_apop_post_post_tag'] ) ) {
|
||||
check_admin_referer( 'sh_options' );
|
||||
$this->update_post_sort( 'post_tag' );
|
||||
require_once self::TEMPLATE_DIR . 'success.php';
|
||||
}
|
||||
|
||||
//カスタム分類の投稿表示順設定
|
||||
if ( isset( $_POST['_apop_post_tax'] ) ) {
|
||||
check_admin_referer( 'sh_options' );
|
||||
$this->update_post_sort( 'tax' );
|
||||
require_once self::TEMPLATE_DIR . 'success.php';
|
||||
}
|
||||
|
||||
require_once self::TEMPLATE_DIR . 'order.php';
|
||||
}
|
||||
|
||||
@@ -88,7 +96,7 @@ if ( ! class_exists( 'APOP' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user