From 0595afc443ed1e2e9df59c2a9cb3ade42f1257a3 Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Tue, 2 Nov 2021 07:28:50 +0000 Subject: [PATCH] class function update --- inc/class/mep_settings_api.php | 42 +- inc/mep_event_meta.php | 6 +- inc/mep_file_include.php | 5 +- inc/mep_functions.php | 208 + js/mage-options-framework.js | 4 +- lib/appsero/src/Insights.php | 18 +- lib/appsero/src/License.php | 12 +- lib/classes/EDD_SL_Plugin_Updater.php | 6 +- lib/classes/class-form-fields-generator.php | 1234 +-- lib/classes/class-form-fields-wrapper.php | 8896 ------------------- lib/classes/class-menu-page.php | 610 +- lib/classes/class-meta-box.php | 763 +- lib/classes/class-taxonomy-edit.php | 320 +- lib/classes/class-theme-page.php | 558 -- templates/single/date_list_title.php | 6 +- templates/single/organizer.php | 10 +- templates/single/total_seat.php | 22 +- 17 files changed, 1063 insertions(+), 11657 deletions(-) diff --git a/inc/class/mep_settings_api.php b/inc/class/mep_settings_api.php index c59463d..2c189cf 100644 --- a/inc/class/mep_settings_api.php +++ b/inc/class/mep_settings_api.php @@ -100,7 +100,7 @@ class MAGE_Setting_API { if ( isset($section['desc']) && !empty($section['desc']) ) { $section['desc'] = '
' . $section['desc'] . '
'; $callback = function() use ( $section ) { - echo str_replace( '"', '\"', $section['desc'] ); + echo str_replace( '"', '\"', esc_html($section['desc']) ); }; } else if ( isset( $section['callback'] ) ) { $callback = $section['callback']; @@ -115,10 +115,10 @@ class MAGE_Setting_API { foreach ( $this->settings_fields as $section => $field ) { foreach ( $field as $option ) { - $name = $option['name']; - $type = isset( $option['type'] ) ? $option['type'] : 'text'; - $label = isset( $option['label'] ) ? $option['label'] : ''; - $callback = isset( $option['callback'] ) ? $option['callback'] : array( $this, 'callback_' . $type ); + $name = $option['name']; + $type = isset( $option['type'] ) ? $option['type'] : 'text'; + $label = isset( $option['label'] ) ? $option['label'] : ''; + $callback = isset( $option['callback'] ) ? $option['callback'] : array( $this, 'callback_' . $type ); $args = array( 'id' => $name, @@ -178,7 +178,7 @@ class MAGE_Setting_API { $html = sprintf( '', $type, $size, $args['section'], $args['id'], $value, $placeholder ); $html .= $this->get_field_description( $args ); - echo $html; + echo mep_esc_html($html); } /** @@ -207,7 +207,7 @@ class MAGE_Setting_API { $html = sprintf( '', $type, $size, $args['section'], $args['id'], $value, $placeholder, $min, $max, $step ); $html .= $this->get_field_description( $args ); - echo $html; + echo mep_esc_html($html); } /** @@ -226,7 +226,7 @@ class MAGE_Setting_API { $html .= sprintf( '%1$s', $args['desc'] ); $html .= ''; - echo $html; + echo mep_esc_html($html); } /** @@ -249,7 +249,7 @@ class MAGE_Setting_API { $html .= $this->get_field_description( $args ); $html .= ''; - echo $html; + echo mep_esc_html($html); } /** @@ -271,7 +271,7 @@ class MAGE_Setting_API { $html .= $this->get_field_description( $args ); $html .= ''; - echo $html; + echo mep_esc_html($html); } /** @@ -292,7 +292,7 @@ class MAGE_Setting_API { $html .= sprintf( '' ); $html .= $this->get_field_description( $args ); - echo $html; + echo mep_esc_html($html); } /** @@ -309,7 +309,7 @@ class MAGE_Setting_API { $html = sprintf( '', $size, $args['section'], $args['id'], $placeholder, $value ); $html .= $this->get_field_description( $args ); - echo $html; + echo mep_esc_html($html); } /** @@ -319,7 +319,7 @@ class MAGE_Setting_API { * @return string */ function callback_html( $args ) { - echo $this->get_field_description( $args ); + echo mep_esc_html($this->get_field_description( $args )); } /** @@ -348,7 +348,7 @@ class MAGE_Setting_API { echo ''; - echo $this->get_field_description( $args ); + echo wp_kses_post($this->get_field_description( $args )); } /** @@ -367,7 +367,7 @@ class MAGE_Setting_API { $html .= ''; $html .= $this->get_field_description( $args ); - echo $html; + echo mep_esc_html($html); } /** @@ -383,7 +383,7 @@ class MAGE_Setting_API { $html = sprintf( '', $size, $args['section'], $args['id'], $value ); $html .= $this->get_field_description( $args ); - echo $html; + echo mep_esc_html($html); } /** @@ -399,7 +399,8 @@ class MAGE_Setting_API { $html = sprintf( '', $size, $args['section'], $args['id'], $value, $args['std'] ); $html .= $this->get_field_description( $args ); - echo $html; + echo mep_esc_html($html); + } @@ -417,7 +418,7 @@ class MAGE_Setting_API { 'echo' => 0 ); $html = wp_dropdown_pages( $dropdown_args ); - echo $html; + echo mep_esc_html($html); } /** @@ -507,7 +508,7 @@ class MAGE_Setting_API { } $html .= ''; - echo $html; + echo mep_esc_html($html); } /** @@ -519,7 +520,7 @@ class MAGE_Setting_API { ?>
settings_sections as $form ) { ?> -