Compare commits
2 Commits
f9fe860c81
...
a76410908b
| Author | SHA1 | Date | |
|---|---|---|---|
| a76410908b | |||
| ff1dcdc5f4 |
@@ -38,9 +38,13 @@ if ( ! class_exists( 'APOP_POST' ) ) {
|
|||||||
|
|
||||||
public function insert_meta_fields() {
|
public function insert_meta_fields() {
|
||||||
//通常ソート
|
//通常ソート
|
||||||
|
if ( get_option( '_apop_normal_order' ) == '1' ) {
|
||||||
$this->create_order_field_data( get_option( '_apop_normal_order_param' ), 'normal' );
|
$this->create_order_field_data( get_option( '_apop_normal_order_param' ), 'normal' );
|
||||||
|
}
|
||||||
//検索ソート
|
//検索ソート
|
||||||
|
if ( get_option( '_apop_tax_sort_type' ) == '1' ) {
|
||||||
$this->create_order_field_data( get_option( '_apop_search_order_param' ), 'search' );
|
$this->create_order_field_data( get_option( '_apop_search_order_param' ), 'search' );
|
||||||
|
}
|
||||||
//カテゴリー、タグ、カスタム分類
|
//カテゴリー、タグ、カスタム分類
|
||||||
$this->create_order_tax_field_data( get_option( '_apop_tax_order_param' ) );
|
$this->create_order_tax_field_data( get_option( '_apop_tax_order_param' ) );
|
||||||
|
|
||||||
@@ -75,7 +79,14 @@ if ( ! class_exists( 'APOP_POST' ) ) {
|
|||||||
|
|
||||||
private function create_order_tax_field_data( $param, $update = false ) {
|
private function create_order_tax_field_data( $param, $update = false ) {
|
||||||
$term_ids = $this->create_post_term_ids();
|
$term_ids = $this->create_post_term_ids();
|
||||||
|
$sort_types = get_option( '_apop_tax_sort_type' );
|
||||||
foreach ( $term_ids as $term_id ) {
|
foreach ( $term_ids as $term_id ) {
|
||||||
|
if(!isset($sort_types[$term_id])){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if($sort_types[$term_id] == '1'){
|
||||||
|
break;
|
||||||
|
}
|
||||||
foreach ( $this->order_param_keys as $order_param_key ) {
|
foreach ( $this->order_param_keys as $order_param_key ) {
|
||||||
if ( isset( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) &&
|
if ( isset( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) &&
|
||||||
! empty( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) ) {
|
! empty( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) ) {
|
||||||
|
|||||||
@@ -15,31 +15,21 @@ if ( ! class_exists( 'APOP_UI' ) ) {
|
|||||||
return $type_data;
|
return $type_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get_all_search_normal_posts(
|
public static function get_all_search_normal_posts( $key ) {
|
||||||
$key
|
|
||||||
): string {
|
|
||||||
$meta_key = '_apop_post_' . $key;
|
$meta_key = '_apop_post_' . $key;
|
||||||
$args = self::create_search_normal_args( $meta_key );
|
$args = self::create_search_normal_args( $meta_key );
|
||||||
$posts_data = get_posts( $args );
|
$posts_data = get_posts( $args );
|
||||||
$list = array();
|
$list = array();
|
||||||
foreach ( $posts_data as $i => $post_data ) {
|
foreach ( $posts_data as $i => $post_data ) {
|
||||||
$order = $i + 1;
|
$order = $i + 1;
|
||||||
$no_order = self::is_sort_post_registered( $post_data->ID, $meta_key ) ? '' : ' no_order';
|
$no_order = self::is_sort_post_registered( $post_data->ID, $meta_key ) ? '' : ' no-order';
|
||||||
$list[] = '<li class="product-list' . esc_html( $no_order ) . '">' . esc_html( self::crate_non_registerd_mark( $no_order ) ) . '
|
echo '<li class="product-list' . esc_attr( $no_order ) . '">'
|
||||||
<span class="sort-num-label">' . esc_html( $order ) . '</span>' . esc_html( $post_data->post_title ) . '
|
. '<span class="sort-num-label">' . esc_html( $order ) . '</span>' . esc_html( $post_data->post_title )
|
||||||
<input type="hidden" class="list_order" name="_apop_post_' . esc_html( $key ) . '[post_sort][' . esc_html( $post_data->ID ) . ']" value="' . esc_html( $order ) . '">
|
. '<input type="hidden" class="list-order"
|
||||||
|
name="_apop_post_' . esc_attr( $key ) . '[post_sort][' . esc_attr( $post_data->ID ) . ']"
|
||||||
|
value="' . esc_attr( $order ) . '">
|
||||||
</li>';
|
</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode( PHP_EOL, $list );
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function crate_non_registerd_mark( $no_order ): string {
|
|
||||||
if ( ! empty( $no_order ) ) {
|
|
||||||
return '■';
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function create_search_normal_args( $meta_key ): array {
|
private static function create_search_normal_args( $meta_key ): array {
|
||||||
@@ -140,11 +130,10 @@ if ( ! class_exists( 'APOP_UI' ) ) {
|
|||||||
$list = array();
|
$list = array();
|
||||||
foreach ( $return_data['data'] as $key => $target_post ) {
|
foreach ( $return_data['data'] as $key => $target_post ) {
|
||||||
$sort_num = $key + 1;
|
$sort_num = $key + 1;
|
||||||
$no_order = self::is_sort_post_registered( $target_post->ID, $return_data['meta_key'] ) ? '' : ' no_order';
|
$no_order = self::is_sort_post_registered( $target_post->ID, $return_data['meta_key'] ) ? '' : ' no-order';
|
||||||
$list[] = '
|
$list[] = '
|
||||||
<li class="product-list' . esc_html( $no_order ) . '">' . esc_html( self::crate_non_registerd_mark( $no_order ) )
|
<li class="product-list' . esc_html( $no_order ) . '">' . '<span class="sort-num-label">' . esc_html( $sort_num ) . '</span>' . get_the_title( $target_post->ID ) . '
|
||||||
. '<span class="sort-num-label">' . esc_html( $sort_num ) . '</span>' . get_the_title( $target_post->ID ) . '
|
<input type="hidden" class="list-order"
|
||||||
<input type="hidden" class="list_order"
|
|
||||||
name="_apop_post_' . esc_html( self::create_post_sort_key( $tax_data->taxonomy, $tax_key ) ) . '[post_sort][' . esc_html( $tax_data->term_id ) . '][' . esc_html( $target_post->ID ) . ']"
|
name="_apop_post_' . esc_html( self::create_post_sort_key( $tax_data->taxonomy, $tax_key ) ) . '[post_sort][' . esc_html( $tax_data->term_id ) . '][' . esc_html( $target_post->ID ) . ']"
|
||||||
value="' . esc_html( $sort_num ) . '">
|
value="' . esc_html( $sort_num ) . '">
|
||||||
</li>';
|
</li>';
|
||||||
@@ -270,7 +259,7 @@ value="' . esc_html( $sort_num ) . '">
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function create_search_normal_list( $type, $id = null ): array {
|
public static function create_search_normal_list( $type, $id = null ) {
|
||||||
$name_keys = self::create_name_keys( $id, $type );
|
$name_keys = self::create_name_keys( $id, $type );
|
||||||
$name_key = $name_keys['name_key'];
|
$name_key = $name_keys['name_key'];
|
||||||
$get_option_key = $name_keys['get_option_key'];
|
$get_option_key = $name_keys['get_option_key'];
|
||||||
@@ -298,65 +287,63 @@ value="' . esc_html( $sort_num ) . '">
|
|||||||
$cnv_order_params = self::set_order_list_param( $order_param, $target_key );
|
$cnv_order_params = self::set_order_list_param( $order_param, $target_key );
|
||||||
$use = $cnv_order_params['use'];
|
$use = $cnv_order_params['use'];
|
||||||
$sort = $cnv_order_params['sort'];
|
$sort = $cnv_order_params['sort'];
|
||||||
$alert = $cnv_order_params['alert'];
|
|
||||||
$no_order_class = $cnv_order_params['no_order_class'];
|
$no_order_class = $cnv_order_params['no_order_class'];
|
||||||
$field_metakey_input = '';
|
$field_metakey_input = '';
|
||||||
$name_use_key = '_' . $name_key . '[' . $target_key . '][use]';
|
$name_use_key = '_' . $name_key . '[' . $target_key . '][use]';
|
||||||
$name_sort_key = '_' . $name_key . '[' . $target_key . '][sort]';
|
$name_sort_key = '_' . $name_key . '[' . $target_key . '][sort]';
|
||||||
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
||||||
$meta_key = $cnv_order_params[ $target_key ]['meta_key'];
|
|
||||||
$value_type = $cnv_order_params[ $target_key ]['value_type'];
|
|
||||||
$field_metakey_input = self::create_custom_field_sort_type( $name_key, $target_key, $meta_key, $value_type );
|
|
||||||
$target_key_check_class = 'custom_field_check';
|
$target_key_check_class = 'custom_field_check';
|
||||||
} else {
|
} else {
|
||||||
$target_key_check_class = 'sort_' . $target_key . '_check';
|
$target_key_check_class = 'sort_' . $target_key . '_check';
|
||||||
}
|
}
|
||||||
$list[] = '<li class="product-list' . esc_html( $no_order_class ) . '">
|
|
||||||
<div class="product-list-type-label"><b>' . esc_html( $target_values[ $target_key ] ) . '</b></div>
|
echo '<li class="product-list' . esc_attr( $no_order_class ) . '">
|
||||||
|
<div class="product-list-type-label"><b>' . esc_attr( $target_values[ $target_key ] ) . '</b></div>
|
||||||
<div class="product-list-sort-type">
|
<div class="product-list-sort-type">
|
||||||
<label>
|
<label>
|
||||||
<input type="hidden" name="' . esc_html( $name_use_key ) . '"
|
<input type="hidden" name="' . esc_attr( $name_use_key ) . '"
|
||||||
value="0"' . esc_html( self::set_search_normal_checked( $use, 0 ) ) . '>
|
value="0"' . esc_attr( self::set_search_normal_checked( $use, 0 ) ) . '>
|
||||||
<span class="en_dis_label">有効</span>:<input class="' . esc_html( $target_key_check_class ) . '"
|
<span class="en_dis_label">有効</span>:<input class="' . esc_html( $target_key_check_class ) . '"
|
||||||
type="checkbox" name="' . esc_html( $name_use_key ) . '" value="1"' . esc_html( self::set_search_normal_checked( $use, 1 ) ) . '>
|
type="checkbox" name="' . esc_attr( $name_use_key ) . '" value="1"' . esc_attr( self::set_search_normal_checked( $use, 1 ) ) . '>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input class="order_param" type="radio"
|
<input class="order_param" type="radio"
|
||||||
name="' . esc_html( $name_sort_key ) . '"
|
name="' . esc_attr( $name_sort_key ) . '"
|
||||||
value="1"' . esc_html( self::set_search_normal_checked( $sort, 1 ) ) . '>昇順</label>
|
value="1"' . esc_attr( self::set_search_normal_checked( $sort, 1 ) ) . '>昇順</label>
|
||||||
<label>
|
<label>
|
||||||
<input class="order_param" type="radio"
|
<input class="order_param" type="radio"
|
||||||
name="' . esc_html( $name_sort_key ) . '"
|
name="' . esc_attr( $name_sort_key ) . '"
|
||||||
value="2"' . esc_html( self::set_search_normal_checked( $sort, 2 ) ) . '>降順</label>
|
value="2"' . esc_attr( self::set_search_normal_checked( $sort, 2 ) ) . '>降順</label>';
|
||||||
' . $field_metakey_input . '
|
|
||||||
</div>
|
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
||||||
|
self::create_custom_field_sort_type( $name_key, $target_key, $cnv_order_params );
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</div>
|
||||||
</li>';
|
</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
|
||||||
implode( PHP_EOL, $list ),
|
|
||||||
$alert,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function create_custom_field_sort_type( $name_key, $target_key, $meta_key, $value_type ): string {
|
private static function create_custom_field_sort_type( $name_key, $target_key, $cnv_order_params ) {
|
||||||
|
$meta_key = $cnv_order_params[ $target_key ]['meta_key'];
|
||||||
|
$value_type = $cnv_order_params[ $target_key ]['value_type'];
|
||||||
$name_meta_key = '_' . $name_key . '[' . $target_key . '][field][meta_key]';
|
$name_meta_key = '_' . $name_key . '[' . $target_key . '][field][meta_key]';
|
||||||
$name_value_type = '_' . $name_key . '[' . $target_key . '][field][value_type]';
|
$name_value_type = '_' . $name_key . '[' . $target_key . '][field][value_type]';
|
||||||
|
echo '<div class="sort-custom-field">
|
||||||
return '<div class="sort_custom_field">
|
<div class="sort-custom-field-inner"><div class="sort-custom-field-inner-label">カスタムフィールドキー:</div>
|
||||||
<div class="sort_custom_field_inner"><div class="sort_custom_field_inner_label">カスタムフィールドキー:</div>
|
<input type="text" class="custom_field_key" name="' . esc_attr( $name_meta_key ) . '" value="' . esc_attr( $meta_key ) . '">
|
||||||
<input type="text" class="custom_field_key" name="' . esc_html( $name_meta_key ) . '" value="' . esc_html( $meta_key ) . '">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sort_custom_field_inner">
|
<div class="sort-custom-field-inner">
|
||||||
<div class="sort_custom_field_inner_label">値タイプ:</div>
|
<div class="sort-custom-field-inner-label">値タイプ:</div>
|
||||||
|
<label class="sort-custom-field-text-label">
|
||||||
|
<input type="radio"
|
||||||
|
class="custom_field_meta_value"
|
||||||
|
name="' . esc_attr( $name_value_type ) . '"
|
||||||
|
value="meta_value"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value' ) ) . '>テキスト</label>
|
||||||
<label><input type="radio"
|
<label><input type="radio"
|
||||||
class="custom_field_meta_value"
|
class="custom_field_meta_value"
|
||||||
name="' . esc_html( $name_value_type ) . '"
|
name="' . esc_attr( $name_value_type ) . '"
|
||||||
value="meta_value"' . esc_html( self::set_search_normal_checked( $value_type, 'meta_value' ) ) . '>テキスト</label>
|
value="meta_value_num"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value_num' ) ) . '>数値</label>
|
||||||
<label><input type="radio"
|
|
||||||
class="custom_field_meta_value"
|
|
||||||
name="' . esc_html( $name_value_type ) . '"
|
|
||||||
value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type, 'meta_value_num' ) ) . '>数値</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
@@ -366,9 +353,9 @@ value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type
|
|||||||
$param = array(
|
$param = array(
|
||||||
'use' => 0,
|
'use' => 0,
|
||||||
'sort' => 2,
|
'sort' => 2,
|
||||||
'alert' => '並べ替えを登録するには「変更を保存」をクリックしてください。',
|
'no_order_class' => ' no-order',
|
||||||
'no_order_class' => ' no_order',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
||||||
$param[ $target_key ] = array(
|
$param[ $target_key ] = array(
|
||||||
'meta_key' => '',
|
'meta_key' => '',
|
||||||
@@ -380,8 +367,7 @@ value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type
|
|||||||
$param = array(
|
$param = array(
|
||||||
'use' => $order_param[ $target_key ]['use'] ?? 0,
|
'use' => $order_param[ $target_key ]['use'] ?? 0,
|
||||||
'sort' => $order_param[ $target_key ]['sort'] ?? 2,
|
'sort' => $order_param[ $target_key ]['sort'] ?? 2,
|
||||||
'alert' => ! $order_param[ $target_key ]['use'] ? '並べ替えを登録するには「変更を保存」をクリックしてください。' : '',
|
'no_order_class' => ! $order_param[ $target_key ]['use'] ? ' no-order' : '',
|
||||||
'no_order_class' => ! $order_param[ $target_key ]['use'] ? ' no_order' : '',
|
|
||||||
);
|
);
|
||||||
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
||||||
$param[ $target_key ] = array(
|
$param[ $target_key ] = array(
|
||||||
@@ -448,11 +434,5 @@ value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function is_disp_per_page( &$disp, $disp_per_page ) {
|
|
||||||
if ( $disp_per_page ) {
|
|
||||||
$disp = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+64
-54
@@ -64,11 +64,11 @@ h3 {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort_menu_list {
|
.sort-menu-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort_menu_list li:first-child {
|
.sort-menu-list li:first-child {
|
||||||
margin-right: 2em;
|
margin-right: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,44 +77,44 @@ p.submit.post-order .button-primary {
|
|||||||
bottom: 1em;
|
bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list,
|
dl.apop-setting-list,
|
||||||
dl.apop_setting_list_dd {
|
dl.apop-setting-list-dd {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: .5em;
|
margin-top: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list dt {
|
dl.apop-setting-list dt {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list dd {
|
dl.apop-setting-list dd {
|
||||||
margin-left: 200px;
|
margin-left: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list dd:first-of-type {
|
dl.apop-setting-list dd:first-of-type {
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list_dd dt {
|
dl.apop-setting-list-dd dt {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list_dd dd {
|
dl.apop-setting-list-dd dd {
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
border-bottom: 1px solid #c3c4c7;
|
border-bottom: 1px solid #c3c4c7;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list_dd dd ul {
|
dl.apop-setting-list-dd dd ul {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list_dd dd label {
|
dl.apop-setting-list-dd dd label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: .3em;
|
margin-bottom: .3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list_dd dd input {
|
dl.apop-setting-list-dd dd input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,47 +134,47 @@ dl.apop_setting_list_dd dd input {
|
|||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drag_sort .product-list {
|
.drag-sort .product-list {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.enable_box .product-list {
|
.enable-box .product-list {
|
||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list {
|
.search-normal-sort .product-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-type-label,
|
.search-normal-sort .product-list-type-label,
|
||||||
.disable_box .product-list-type-label {
|
.disable-box .product-list-type-label {
|
||||||
width: calc((100%) - 60px);
|
width: calc((100%) - 60px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.enable_box .product-list-type-label {
|
.enable-box .product-list-type-label {
|
||||||
width: calc(100% / 2);
|
width: calc(100% / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-sort-type {
|
.search-normal-sort .product-list-sort-type {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-sort-type label {
|
.search-normal-sort .product-list-sort-type label {
|
||||||
width: calc((100% / 4) - 5px);
|
width: calc((100% / 4) - 5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-sort-type label:first-of-type {
|
.search-normal-sort .product-list-sort-type label:first-of-type {
|
||||||
width: 5em;
|
width: 5em;
|
||||||
margin-right: 3em;
|
margin-right: 3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-list.no_order {
|
.product-list.no-order {
|
||||||
background: #ababab;
|
background: #ababab;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_order {
|
.list-order {
|
||||||
width: 2em;
|
width: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,55 +186,60 @@ dl.apop_setting_list_dd dd input {
|
|||||||
content: "]";
|
content: "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
.no_registered_exp {
|
.no-registered-exp {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 1em 0 0 .5em;
|
margin: 1em 0 0 .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order_setting_list > li {
|
.order-setting-list > li {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_per_page {
|
.select-per-page {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort_custom_field {
|
.sort-custom-field {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: .5em;
|
margin-top: .5em;
|
||||||
padding-top: .5em;
|
padding-top: .5em;
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort_custom_field_inner {
|
.sort-custom-field-inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort_custom_field_inner:first-child {
|
.sort-custom-field-inner:first-child {
|
||||||
margin-bottom: .5em;
|
margin-bottom: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort_custom_field_inner_label {
|
.sort-custom-field-inner-label {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disable_normal_list {
|
.search-normal-sort .product-list-sort-type label.sort-custom-field-text-label {
|
||||||
|
width: 7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disable-normal-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin: .5em 1em 1em 0;
|
margin: .5em 1em 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disable_box .product-list-sort-type label:not(:first-of-type),
|
.disable-box .product-list-sort-type label:not(:first-of-type),
|
||||||
.disable_box .sort_custom_field,
|
.disable-box .sort-custom-field,
|
||||||
.disable_box .sort_custom_field_inner {
|
.disable-box .sort-custom-field-inner {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disable_box .product-list {
|
.disable-box .product-list {
|
||||||
width: calc((100% / 2) - 15px);
|
width: calc((100% / 2) - 15px);
|
||||||
display: flex;
|
display: flex;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
@@ -244,63 +249,63 @@ dl.apop_setting_list_dd dd input {
|
|||||||
margin: 1em .5em;
|
margin: 1em .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.apop-form_table {
|
.apop-form-table {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.apop-form_table th {
|
.apop-form-table th {
|
||||||
padding-left: .5em;
|
padding-left: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.enable_box {
|
.enable-box {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.enable_box,
|
.enable-box,
|
||||||
.disable_box {
|
.disable-box {
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.enable_box h4 {
|
.enable-box h4 {
|
||||||
margin: .5em 0 0;
|
margin: .5em 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disable_box h4 {
|
.disable-box h4 {
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1264px) {
|
@media only screen and (max-width: 1264px) {
|
||||||
.enable_box .product-list,
|
.enable-box .product-list,
|
||||||
.disable_box .product-list {
|
.disable-box .product-list {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list {
|
.search-normal-sort .product-list {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-type-label,
|
.search-normal-sort .product-list-type-label,
|
||||||
.disable_box .product-list-type-label {
|
.disable-box .product-list-type-label {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-sort-type {
|
.search-normal-sort .product-list-sort-type {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-sort-type {
|
.search-normal-sort .product-list-sort-type {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-sort-type label {
|
.search-normal-sort .product-list-sort-type label {
|
||||||
width: calc((100% / 3) - 5px);
|
width: calc((100% / 3) - 5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list-sort-type label:first-of-type {
|
.search-normal-sort .product-list-sort-type label:first-of-type {
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -320,18 +325,23 @@ dl.apop_setting_list_dd dd input {
|
|||||||
margin: 1.5em 0 0 0;
|
margin: 1.5em 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list dt {
|
dl.apop-setting-list dt {
|
||||||
float: none;
|
float: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list dd {
|
dl.apop-setting-list dd {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.apop_setting_list li label input[type="text"] {
|
dl.apop-setting-list li label input[type="text"] {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin-top: .5em;
|
margin-top: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sort-custom-field-inner-label {
|
||||||
|
width: auto;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+14
-14
@@ -57,9 +57,9 @@ jQuery(function ($) {
|
|||||||
update: function () {
|
update: function () {
|
||||||
let list_count = $('.product-list', my_list).length;
|
let list_count = $('.product-list', my_list).length;
|
||||||
for (let j = 0; j < list_count; j++) {
|
for (let j = 0; j < list_count; j++) {
|
||||||
let list_order = j + 1;
|
let list_order_num = j + 1;
|
||||||
$('.list_order:eq(' + j + ')', my_list).val(list_order);
|
$('.list-order:eq(' + j + ')', my_list).val(list_order_num);
|
||||||
$('.list_order:eq(' + j + ')', my_list).siblings('.sort-num-label').text(list_order);
|
$('.list-order:eq(' + j + ')', my_list).siblings('.sort-num-label').text(list_order_num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,12 +70,12 @@ jQuery(function ($) {
|
|||||||
|
|
||||||
function change_sort_box() {
|
function change_sort_box() {
|
||||||
let s_radio = $('.sort_menu');
|
let s_radio = $('.sort_menu');
|
||||||
let sort_menu_size = $('.sort_menu_list').length;
|
let sort_menu_size = $('.sort-menu-list').length;
|
||||||
|
|
||||||
$('.sort_box').hide();
|
$('.sort_box').hide();
|
||||||
for (let i = 0; i < sort_menu_size; i++) {
|
for (let i = 0; i < sort_menu_size; i++) {
|
||||||
let type_index = $('.sort_menu_list:eq(' + i + ')').data('order_target') - 1;
|
let type_index = $('.sort-menu-list:eq(' + i + ')').data('order_target') - 1;
|
||||||
$('.sort_menu_list:eq(' + i + ')').siblings('.sort_box:eq(' + type_index + ')').show();
|
$('.sort-menu-list:eq(' + i + ')').siblings('.sort_box:eq(' + type_index + ')').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
s_radio.on('click', function () {
|
s_radio.on('click', function () {
|
||||||
@@ -93,18 +93,18 @@ jQuery(function ($) {
|
|||||||
for (i; i < input_chk_size; i++) {
|
for (i; i < input_chk_size; i++) {
|
||||||
let chk = $('.select_cat_checkbox:eq(' + i + '):checked').length;
|
let chk = $('.select_cat_checkbox:eq(' + i + '):checked').length;
|
||||||
if (chk == 1) {
|
if (chk == 1) {
|
||||||
$('.select_cat:eq(' + i + ')').siblings('.select_per_page').show();
|
$('.select_cat:eq(' + i + ')').siblings('.select-per-page').show();
|
||||||
} else {
|
} else {
|
||||||
$('.select_cat:eq(' + i + ')').siblings('.select_per_page').hide();
|
$('.select_cat:eq(' + i + ')').siblings('.select-per-page').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
select_cat_checkbox.on('click', function () {
|
select_cat_checkbox.on('click', function () {
|
||||||
let checked = $(this).prop('checked');
|
let checked = $(this).prop('checked');
|
||||||
if (checked) {
|
if (checked) {
|
||||||
$(this).parent().parent().siblings('.select_per_page').show(200);
|
$(this).parent().parent().siblings('.select-per-page').show(200);
|
||||||
} else {
|
} else {
|
||||||
$(this).parent().parent().siblings('.select_per_page').hide(200);
|
$(this).parent().parent().siblings('.select-per-page').hide(200);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ jQuery(function ($) {
|
|||||||
s_box.find(targets).each(function () {
|
s_box.find(targets).each(function () {
|
||||||
if ($(this).prop('checked') == false) {
|
if ($(this).prop('checked') == false) {
|
||||||
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', true);
|
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', true);
|
||||||
let disable_list = $(this).parents('.sort_box').find('.disable_normal_list');
|
let disable_list = $(this).parents('.sort_box').find('.disable-normal-list');
|
||||||
$(this).parents('li').appendTo(disable_list);
|
$(this).parents('li').appendTo(disable_list);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -165,11 +165,11 @@ jQuery(function ($) {
|
|||||||
if ($(this).prop('checked') == true) {
|
if ($(this).prop('checked') == true) {
|
||||||
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', false);
|
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', false);
|
||||||
let enable_list = $(this).parents('.sort_box').find('.post-order-list');
|
let enable_list = $(this).parents('.sort_box').find('.post-order-list');
|
||||||
$(this).parents('li').appendTo(enable_list).removeClass('no_order').hide().fadeIn(200);
|
$(this).parents('li').appendTo(enable_list).removeClass('no-order').hide().fadeIn(200);
|
||||||
} else {
|
} else {
|
||||||
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', true);
|
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', true);
|
||||||
let disable_list = $(this).parents('.sort_box').find('.disable_normal_list');
|
let disable_list = $(this).parents('.sort_box').find('.disable-normal-list');
|
||||||
$(this).parents('li').appendTo(disable_list).addClass('no_order').hide().fadeIn(200);
|
$(this).parents('li').appendTo(disable_list).addClass('no-order').hide().fadeIn(200);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-21
@@ -16,7 +16,7 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
|
|||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<?php wp_nonce_field( 'sh_options' ); ?>
|
<?php wp_nonce_field( 'sh_options' ); ?>
|
||||||
<input id="apop_submit_type" type="hidden" name="apop_submit_type"
|
<input id="apop_submit_type" type="hidden" name="apop_submit_type"
|
||||||
value="<?php echo esc_html( $submit_type ); ?>">
|
value="<?php echo esc_attr( $submit_type ); ?>">
|
||||||
<div class="post-order-box">
|
<div class="post-order-box">
|
||||||
<div class="list-orders-outer">
|
<div class="list-orders-outer">
|
||||||
<div class="list-orders-inner">
|
<div class="list-orders-inner">
|
||||||
@@ -27,24 +27,22 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
|
|||||||
?>
|
?>
|
||||||
<?php include APOP_PLUGIN_PATH . 'template/order_parts_menu.php'; ?>
|
<?php include APOP_PLUGIN_PATH . 'template/order_parts_menu.php'; ?>
|
||||||
<hr>
|
<hr>
|
||||||
|
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
|
||||||
<div class="sort_box">
|
<div class="sort_box">
|
||||||
<?php list( $list, $alert) = APOP_UI::create_search_normal_list( 'normal' ); ?>
|
<div class="enable-box">
|
||||||
<p><?php echo esc_html( $alert ); ?></p>
|
|
||||||
<div class="enable_box">
|
|
||||||
<h4>有効</h4>
|
<h4>有効</h4>
|
||||||
<ul class="post-order-list search_normal_sort">
|
<ul class="post-order-list search-normal-sort">
|
||||||
<?php echo $list; ?>
|
<?php APOP_UI::create_search_normal_list( 'normal' ); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="disable_box">
|
<div class="disable-box">
|
||||||
<h4>無効</h4>
|
<h4>無効</h4>
|
||||||
<ul class="disable_normal_list"></ul>
|
<ul class="disable-normal-list"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sort_box">
|
<div class="sort_box">
|
||||||
<div class="no_registered_exp">■は未登録項目です。ドラッグして並び順を変更後に「変更を保存」をクリックしてください。</div>
|
<ul class="post-order-list drag-sort">
|
||||||
<ul class="post-order-list drag_sort">
|
<?php APOP_UI::get_all_search_normal_posts( 'normal' ); ?>
|
||||||
<?php echo APOP_UI::get_all_search_normal_posts( 'normal' ); ?>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,24 +58,22 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
|
|||||||
?>
|
?>
|
||||||
<?php include APOP_PLUGIN_PATH . 'template/order_parts_menu.php'; ?>
|
<?php include APOP_PLUGIN_PATH . 'template/order_parts_menu.php'; ?>
|
||||||
<hr>
|
<hr>
|
||||||
|
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
|
||||||
<div class="sort_box">
|
<div class="sort_box">
|
||||||
<?php list( $list, $alert) = APOP_UI::create_search_normal_list( 'search' ); ?>
|
<div class="enable-box">
|
||||||
<p><?php echo esc_html( $alert ); ?></p>
|
|
||||||
<div class="enable_box">
|
|
||||||
<h4>有効</h4>
|
<h4>有効</h4>
|
||||||
<ul class="post-order-list search_normal_sort">
|
<ul class="post-order-list search-normal-sort">
|
||||||
<?php echo $list; ?>
|
<?php APOP_UI::create_search_normal_list( 'search' ); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="disable_box">
|
<div class="disable-box">
|
||||||
<h4>無効</h4>
|
<h4>無効</h4>
|
||||||
<ul class="disable_normal_list"></ul>
|
<ul class="disable-normal-list"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sort_box">
|
<div class="sort_box">
|
||||||
<div class="no_registered_exp">■は未登録項目です。ドラッグして並び順を変更後に「変更を保存」をクリックしてください。</div>
|
<ul class="post-order-list drag-sort">
|
||||||
<ul class="post-order-list drag_sort">
|
<?php APOP_UI::get_all_search_normal_posts( 'search' ); ?>
|
||||||
<?php echo APOP_UI::get_all_search_normal_posts( 'search' ); ?>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?php if ( isset( $order_target, $order_target_type ) ): ?>
|
<?php if ( isset( $order_target, $order_target_type ) ): ?>
|
||||||
<ul class="sort_menu_list"
|
<ul class="sort-menu-list"
|
||||||
data-order_target="<?php echo esc_html($order_target); ?>">
|
data-order_target="<?php echo esc_attr( $order_target ); ?>">
|
||||||
<li><label>
|
<li><label>
|
||||||
<input class="sort_menu" type="radio" name="<?php echo esc_html($order_target_type); ?>"
|
<input class="sort_menu" type="radio" name="<?php echo esc_attr( $order_target_type ); ?>"
|
||||||
value="1"<?php checked( $order_target, 1 ); ?>>標準+カスタムフィールドソート</label></li>
|
value="1"<?php checked( $order_target, 1 ); ?>>標準+カスタムフィールドソート</label></li>
|
||||||
<li><label>
|
<li><label>
|
||||||
<input class="sort_menu" type="radio" name="<?php echo esc_html($order_target_type); ?>"
|
<input class="sort_menu" type="radio" name="<?php echo esc_attr( $order_target_type ); ?>"
|
||||||
value="2"<?php checked( $order_target, 2 ); ?>>ドラッグソート</label></li>
|
value="2"<?php checked( $order_target, 2 ); ?>>ドラッグソート</label></li>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif;
|
<?php endif;
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
<?php foreach ( $tax_lists as $tax_key => $tax_list ) : ?>
|
<?php foreach ( $tax_lists as $tax_key => $tax_list ) : ?>
|
||||||
<div class="list-orders-outer">
|
<div class="list-orders-outer">
|
||||||
<?php if ( count( $tax_list ) > 0 ): ?>
|
<?php if ( count( $tax_list ) > 0 ): ?>
|
||||||
<div class="no_registered_exp">■は未登録項目です。ドラッグして並び順を変更後に「変更を保存」をクリックしてください。</div>
|
|
||||||
<?php foreach ( $tax_list as $tax_data ): ?>
|
<?php foreach ( $tax_list as $tax_data ): ?>
|
||||||
<div class="list-orders-inner">
|
<div class="list-orders-inner">
|
||||||
<h3><?php echo esc_html( $tax_data->name ); ?></h3>
|
<h3><?php echo esc_html( $tax_data->name ); ?></h3>
|
||||||
@@ -14,45 +13,47 @@
|
|||||||
$order_target = 1;
|
$order_target = 1;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<ul class="sort_menu_list"
|
<ul class="sort-menu-list"
|
||||||
data-order_target="<?php echo esc_html( $order_target ); ?>">
|
data-order_target="<?php echo esc_attr( $order_target ); ?>">
|
||||||
<li>
|
<li>
|
||||||
<label>
|
<label>
|
||||||
<input class="sort_menu" type="radio"
|
<input class="sort_menu" type="radio"
|
||||||
name="_apop_tax_sort_type[<?php echo esc_html( $tax_data->term_id ); ?>]"
|
name="_apop_tax_sort_type[<?php echo esc_attr( $tax_data->term_id ); ?>]"
|
||||||
value="1"<?php checked( $order_target, 1 ); ?>>ドラッグソート</label>
|
value="1"<?php checked( $order_target, 1 ); ?>>ドラッグソート</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>
|
<label>
|
||||||
<input class="sort_menu" type="radio"
|
<input class="sort_menu" type="radio"
|
||||||
name="_apop_tax_sort_type[<?php echo esc_html( $tax_data->term_id ); ?>]"
|
name="_apop_tax_sort_type[<?php echo esc_attr( $tax_data->term_id ); ?>]"
|
||||||
value="2"<?php checked( $order_target, 2 ); ?>>標準+カスタムフィールドソート</label>
|
value="2"<?php checked( $order_target, 2 ); ?>>標準+カスタムフィールドソート</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="sort_box">
|
<div class="sort_box">
|
||||||
<ul class="post-order-list drag_sort">
|
<hr>
|
||||||
|
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
|
||||||
|
<ul class="post-order-list drag-sort">
|
||||||
<?php echo APOP_UI::create_order_list( $tax_data, $tax_key ); ?>
|
<?php echo APOP_UI::create_order_list( $tax_data, $tax_key ); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="sort_box">
|
<div class="sort_box">
|
||||||
<?php list( $list, $alert ) = APOP_UI::create_search_normal_list( 'tax', $tax_data->term_id ); ?>
|
<hr>
|
||||||
<p><?php echo esc_html( $alert ); ?></p>
|
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
|
||||||
<div class="enable_box">
|
<div class="enable-box">
|
||||||
<h4>有効</h4>
|
<h4>有効</h4>
|
||||||
<ul class="post-order-list search_normal_sort">
|
<ul class="post-order-list search-normal-sort">
|
||||||
<?php echo $list; ?>
|
<?php APOP_UI::create_search_normal_list( 'tax', $tax_data->term_id ); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="disable_box">
|
<div class="disable-box">
|
||||||
<h4>無効</h4>
|
<h4>無効</h4>
|
||||||
<ul class="disable_normal_list"></ul>
|
<ul class="disable-normal-list"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<p class="no_registered_exp">並べ替えをカスタマイズする<?php echo esc_html( $tax_title_text ); ?>は選択されていません。</p>
|
<p class="no-registered-exp">並べ替えをカスタマイズする<?php echo esc_html( $tax_title_text ); ?>は選択されていません。</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
+8
-11
@@ -1,23 +1,19 @@
|
|||||||
<div class="post-setting-box">
|
<div class="post-setting-box">
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<?php
|
<?php wp_nonce_field( 'sh_options' ); ?>
|
||||||
wp_nonce_field( 'sh_options' );
|
|
||||||
$opt_per_page = get_option( '_apop_per_page' );
|
|
||||||
$default_per_page = get_option( 'posts_per_page' );
|
|
||||||
?>
|
|
||||||
<h2>設定</h2>
|
<h2>設定</h2>
|
||||||
<table class="form-table apop-form_table">
|
<table class="form-table apop-form-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">全体設定</th>
|
<th scope="row">全体設定</th>
|
||||||
<td>
|
<td>
|
||||||
<dl class="apop_setting_list">
|
<dl class="apop-setting-list">
|
||||||
<dt>1ページ表示件数</dt>
|
<dt>1ページ表示件数</dt>
|
||||||
<dd><?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'search' ); ?>
|
<dd><?php $per_page_data = APOP_UI::create_cat_per_page( get_option( '_apop_per_page' ), 'search' ); ?>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>
|
<label>
|
||||||
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
|
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
|
||||||
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html($default_per_page); ?>
|
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html( get_option( 'posts_per_page' ) ); ?>
|
||||||
件)</label>
|
件)</label>
|
||||||
</li>
|
</li>
|
||||||
<li><label>
|
<li><label>
|
||||||
@@ -27,10 +23,11 @@
|
|||||||
<li>
|
<li>
|
||||||
<label><input class="per_page_search" type="radio"
|
<label><input class="per_page_search" type="radio"
|
||||||
name="_apop_per_page[search]"
|
name="_apop_per_page[search]"
|
||||||
value="<?php echo esc_html($per_page_data['_checked']); ?>">表示数設定
|
value="" <?php echo esc_attr( $per_page_data['_checked'] ); ?>>表示数設定
|
||||||
<input class="per_page_search_input" type="text"
|
<input class="per_page_search_input" type="text"
|
||||||
name="_apop_per_page[search]"
|
name="_apop_per_page[search]"
|
||||||
value="<?php echo esc_html($per_page_data['_per_page_num']); ?>" required>
|
value="<?php echo esc_attr( $per_page_data['_per_page_num'] ); ?>"
|
||||||
|
required>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,58 +1,54 @@
|
|||||||
<?php if ( isset( $tax_data, $order_name, $order_tax ) ): ?>
|
<?php if ( isset( $tax_data, $order_name, $order_tax ) ): ?>
|
||||||
<?php
|
<dl class="apop-setting-list">
|
||||||
$default_per_page = get_option( 'posts_per_page' );
|
|
||||||
$opt_per_page = get_option( '_apop_per_page' );
|
|
||||||
?>
|
|
||||||
<dl class="apop_setting_list">
|
|
||||||
<dt>対象</dt>
|
<dt>対象</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul class="order_setting_list">
|
<ul class="order-setting-list">
|
||||||
<?php foreach ( $tax_data as $tax_datum ): ?>
|
<?php foreach ( $tax_data as $tax_datum ): ?>
|
||||||
<?php
|
<?php
|
||||||
$opt_cat = get_option( $order_name );
|
$opt_cat = get_option( $order_name );
|
||||||
$check_slug = $opt_cat['target_cat'][ $tax_datum->term_id ] ?? '';
|
$check_slug = $opt_cat['target_cat'][ $tax_datum->term_id ] ?? '';
|
||||||
APOP_UI::is_disp_per_page( $disp, $check_slug );
|
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<div class="select_cat">
|
<div class="select_cat">
|
||||||
<label>
|
<label>
|
||||||
<input type="hidden"
|
<input type="hidden"
|
||||||
name="<?php echo esc_html($order_name); ?>[target_cat][<?php echo esc_html($tax_datum->term_id); ?>]"
|
name="<?php echo esc_attr( $order_name ); ?>[target_cat][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
|
||||||
value="0">
|
value="0">
|
||||||
<input class="select_cat_checkbox" type="checkbox"
|
<input class="select_cat_checkbox" type="checkbox"
|
||||||
name="<?php echo esc_html($order_name); ?>[target_cat][<?php echo esc_html($tax_datum->term_id); ?>]"
|
name="<?php echo esc_attr( $order_name ); ?>[target_cat][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
|
||||||
<?php checked( $check_slug, 1 ); ?>
|
<?php checked( $check_slug, 1 ); ?>
|
||||||
value="1">
|
value="1">
|
||||||
<?php echo esc_html( $tax_datum->name ); ?>
|
<?php echo esc_html( $tax_datum->name ); ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<?php $per_page_data = APOP_UI::create_tax_per_page( $opt_per_page, $order_tax, $tax_datum->term_id ); ?>
|
<?php $per_page_data = APOP_UI::create_tax_per_page( get_option( '_apop_per_page' ), $order_tax, $tax_datum->term_id ); ?>
|
||||||
<div class="select_per_page">
|
<div class="select-per-page">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>
|
<label>
|
||||||
<input class="per_page_cat" type="radio"
|
<input class="per_page_cat" type="radio"
|
||||||
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
|
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
|
||||||
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html($default_per_page); ?>
|
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html( get_option( 'posts_per_page' ) ); ?>
|
||||||
件)</label>
|
件)</label>
|
||||||
</li>
|
</li>
|
||||||
<li><label>
|
<li><label>
|
||||||
<input class="per_page_cat" type="radio"
|
<input class="per_page_cat" type="radio"
|
||||||
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
|
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
|
||||||
value="all"<?php checked( $per_page_data['_per_page'], 'all' ); ?>>全体設定に従う</label>
|
value="all"<?php checked( $per_page_data['_per_page'], 'all' ); ?>>全体設定に従う</label>
|
||||||
</li>
|
</li>
|
||||||
<li><label>
|
<li><label>
|
||||||
<input class="per_page_cat" type="radio"
|
<input class="per_page_cat" type="radio"
|
||||||
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
|
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
|
||||||
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="set_number_list">
|
<li class="set_number_list">
|
||||||
<label><input class="per_page_cat set_number" type="radio"
|
<label><input class="per_page_cat set_number" type="radio"
|
||||||
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
|
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
|
||||||
value=""<?php echo esc_html($per_page_data['_checked']); ?>>表示数設定
|
value=""<?php echo esc_attr( $per_page_data['_checked'] ); ?>>表示数設定
|
||||||
<input class="per_page_cat_input" type="text"
|
<input class="per_page_cat_input" type="text"
|
||||||
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
|
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
|
||||||
value="<?php echo esc_html($per_page_data['_per_page_num']); ?>" required>
|
value="<?php echo esc_attr( $per_page_data['_per_page_num'] ); ?>"
|
||||||
|
required>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="order_setting_custom_field_box">
|
<div class="order_setting_custom_field_box">
|
||||||
<?php if ( isset( $this->order_field ) && count( $this->order_field ) > 0 ): ?>
|
<?php if ( isset( $this->order_field ) && count( $this->order_field ) > 0 ): ?>
|
||||||
<dl class="apop_setting_list_dd">
|
<dl class="apop-setting-list-dd">
|
||||||
<?php foreach ( $this->order_field as $type => $items ): ?>
|
<?php foreach ( $this->order_field as $type => $items ): ?>
|
||||||
<dt><?php echo esc_html( $this->labels[ $type ] ); ?></dt>
|
<dt><?php echo esc_html( $this->labels[ $type ] ); ?></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<?php if ( ! empty( $item ) ): ?>
|
<?php if ( ! empty( $item ) ): ?>
|
||||||
<li><label><?php echo esc_html( $item ); ?></label>
|
<li><label><?php echo esc_html( $item ); ?></label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="<?php echo esc_html( APOP_CUSTOM_FIELD_PREFIX . $item ); ?>"
|
name="<?php echo esc_attr( APOP_CUSTOM_FIELD_PREFIX . $item ); ?>"
|
||||||
value="<?php echo esc_html( $this->get_custom_field_data( $item ) ); ?>"/>
|
value="<?php echo esc_attr( $this->get_custom_field_data( $item ) ); ?>"/>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user