WP PLUGIN エスケープ処理の修正

・echo時にエスケープするようメソッド修正
・HTMLタグないのエスケープをesc_attr()に変更
This commit is contained in:
2021-06-19 09:18:48 +09:00
parent f9fe860c81
commit ff1dcdc5f4
8 changed files with 144 additions and 148 deletions
+13 -2
View File
@@ -38,9 +38,13 @@ if ( ! class_exists( 'APOP_POST' ) ) {
public function insert_meta_fields() {
//通常ソート
$this->create_order_field_data( get_option( '_apop_normal_order_param' ), 'normal' );
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_search_order_param' ), 'search' );
if ( get_option( '_apop_tax_sort_type' ) == '1' ) {
$this->create_order_field_data( get_option( '_apop_search_order_param' ), 'search' );
}
//カテゴリー、タグ、カスタム分類
$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 ) {
$term_ids = $this->create_post_term_ids();
$sort_types = get_option( '_apop_tax_sort_type' );
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 ) {
if ( isset( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) &&
! empty( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) ) {