Compare commits

...

1 Commits

Author SHA1 Message Date
nobu d4e4c772aa ・WordPress6.9動作確認
・PHP8.3対応修正
2025-12-17 09:23:22 +09:00
3 changed files with 281 additions and 256 deletions
+23 -2
View File
@@ -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(
+8 -4
View File
@@ -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.5
Requires PHP: 7.4
Stable tag: 1.2.3
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,10 @@ screenshot-7.png
screenshot-8.png
== Changelog ==
= 1.2.4 =
・WordPress6.9動作確認
・PHP8.3対応修正
= 1.2.3 =
confirm WordPress6.5
+1 -1
View File
@@ -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();
}