PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.2
WebberZone Top 10 — Popular Posts v4.5.2
4.5.2 4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 All 118 releases
← All changes | includes/admin/settings/class-settings-wizard-api.php +8 -2 4.3.3 → 4.5.2 View file →
@@ -19,8 +19,10 @@
19 19 }
20 20
21 21 /**
22 22 * Settings Wizard API class
23 + *
24 + * @since 4.2.0
23 25 */
24 26 class Settings_Wizard_API {
25 27
26 28 /**
@@ -420,9 +422,9 @@
420 422 $settings_sanitize = $this->settings_sanitize;
421 423
422 424 // Check if we have a specific sanitizer for this type.
423 425 if ( is_callable( array( $settings_sanitize, "sanitize_{$type}_field" ) ) ) {
424 - return call_user_func( array( $settings_sanitize, "sanitize_{$type}_field" ), $value );
426 + return call_user_func( array( $settings_sanitize, "sanitize_{$type}_field" ), $value, $setting_config );
425 427 }
426 428
427 429 // Fallback to basic sanitization.
428 430 if ( is_array( $value ) ) {
@@ -645,9 +647,13 @@
645 647
646 648 echo '<tr>';
647 649 echo '<th scope="row">';
648 650 if ( ! empty( $args['name'] ) ) {
649 - echo '<label for="' . esc_attr( $setting_id ) . '">' . esc_html( wp_strip_all_tags( $args['name'] ) ) . '</label>';
651 + if ( in_array( $type, array( 'header', 'repeater' ), true ) ) {
652 + echo wp_kses_post( $args['name'] );
653 + } else {
654 + echo '<label for="' . esc_attr( $this->settings_form->get_field_id( $args ) ) . '">' . wp_kses_post( $args['name'] ) . '</label>';
655 + }
650 656 }
651 657 echo '</th>';
652 658 echo '<td>';
653 659 \call_user_func( $callback, $args );