WP PLUGIN 申請指摘事項の修正

・$_POSTのサニタイズ
・echoのエスケープ
・readmeの修正
This commit is contained in:
2021-06-17 14:00:18 +09:00
parent e3c8fc967c
commit 00d6775f77
12 changed files with 91 additions and 80 deletions
+26 -23
View File
@@ -199,8 +199,32 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
);
}
/**
* 通常ページの1ページ表示件数を取得する
*
* 1ページ表示件数を取得する
* APOP::per_page(ID, [TARGET]);
* [TARGET]
* cat
* tag
* tax
*
* @param string $target
* @param null $id
*
* @return array
*/
public static function per_page( $id = null, string $target = 'search' ) {
if ( $target == 'cat' ) {
$target = 'category';
}
return array( 'posts_per_page' => self::set_per_page( $target, $id ) );
}
/**
* 通常ページのソートを取得する
* APOP::orderby_normal()
* @return array|null
*/
@@ -228,7 +252,7 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
}
/**
* カテゴリー、タグ、カスタム分類の1ページ表示件数を取得する
* カテゴリー、タグ、カスタム分類のソートを取得する
* APOP::orderby_tax([ID, TARGET], );
* [TARGET]
* cat
@@ -265,26 +289,5 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
return;
}
/**
*
* 1ページ表示件数を取得する
* APOP::per_page(ID, [TARGET]);
* [TARGET]
* cat
* tag
* tax
*
* @param string $target
* @param null $id
*
* @return array
*/
public static function per_page( $id = null, string $target = 'search' ) {
if ( $target == 'cat' ) {
$target = 'category';
}
return array( 'posts_per_page' => self::set_per_page( $target, $id ) );
}
}
}