Compare commits
3 Commits
49d6527486
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d4e4c772aa | |||
| d8375c5abe | |||
| 49f7d3088c |
@@ -451,19 +451,40 @@ value="' . esc_html($sort_num) . '">
|
||||
if ( $param == $default ) {
|
||||
return ' checked="checked"';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* POSTデータのフィルタリングを行います。
|
||||
*
|
||||
* @param string $var_name 取得するPOST変数名。
|
||||
* @param string $type 'array' または 'str' を指定します。
|
||||
*
|
||||
* @return array|string フィルタリングされたPOSTデータ、または失敗した場合は空文字列。
|
||||
*/
|
||||
public static function input_post_filter( $var_name, $type ) {
|
||||
if ( $type == 'array' ) {
|
||||
return filter_input(INPUT_POST, $var_name, FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY);
|
||||
$data = filter_input( INPUT_POST, $var_name, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
|
||||
if ( is_array( $data ) ) {
|
||||
array_walk_recursive( $data, function ( &$value ) {
|
||||
$value = htmlspecialchars( $value, ENT_QUOTES, 'UTF-8' );
|
||||
} );
|
||||
return $data;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
if ( $type == 'str' ) {
|
||||
return filter_input(INPUT_POST, $var_name, FILTER_SANITIZE_STRING);
|
||||
$data = filter_input( INPUT_POST, $var_name );
|
||||
if ( $data !== null && $data !== false ) {
|
||||
return htmlspecialchars( $data, ENT_QUOTES, 'UTF-8' );
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function create_normal_sort_list( $name_key, $order_param ) {
|
||||
$target_keys = self::set_search_normal_target_keys( $order_param );
|
||||
$target_values = array(
|
||||
|
||||
+11
-4
@@ -1,10 +1,10 @@
|
||||
=== Archive Post Order Plus ===
|
||||
Contributors: nbk45
|
||||
Tags: latest posts order,categories post order,tags post order,custom taxonomy post order
|
||||
Requires at least: 4.9
|
||||
Tested up to: 6.3
|
||||
Requires PHP: 7.4
|
||||
Stable tag: 1.2.2
|
||||
Requires at least: 6.7
|
||||
Tested up to: 6.9
|
||||
Requires PHP: 8.3
|
||||
Stable tag: 1.2.4
|
||||
License: GPLv2 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@@ -82,6 +82,13 @@ screenshot-7.png
|
||||
screenshot-8.png
|
||||
|
||||
== Changelog ==
|
||||
= 1.2.4 =
|
||||
・WordPress6.9動作確認
|
||||
・PHP8.3対応修正
|
||||
|
||||
= 1.2.3 =
|
||||
confirm WordPress6.5
|
||||
|
||||
= 1.2.2 =
|
||||
confirm WordPress6.3
|
||||
confirm WordPress6.1
|
||||
|
||||
@@ -19,7 +19,7 @@ if ( ! trait_exists( 'CUSTOMFIELD_SELECT' ) ) {
|
||||
}
|
||||
|
||||
public function set_custom_field() {
|
||||
$param = filter_input( INPUT_GET, 'param', FILTER_SANITIZE_STRING );
|
||||
$param = filter_input( INPUT_GET, 'param', FILTER_DEFAULT );
|
||||
echo json_encode( $this->get_custom_fields_by_param( $param ) );
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -121,6 +121,10 @@ if ( ! trait_exists( 'CUSTOMPOSTS' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if( ! isset($per_page_option['custompost_archive'] ) ){
|
||||
return;
|
||||
}
|
||||
|
||||
$per_page_option_data = $per_page_option['custompost_archive'][ $post_type ];
|
||||
if ( ! isset( $per_page_option_data ) ) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user