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-api.php +13 -1 4.5.1 → 4.5.2 View file →
@@ -265,8 +265,11 @@
265 265 'reset_button_confirm' => 'Do you really want to reset all these settings to their default values?',
266 266 'button_label' => 'Choose File',
267 267 'previous_saved' => 'Previously saved',
268 268 'repeater_new_item' => 'New Item',
269 + 'repeater_move_up' => 'Move item up',
270 + 'repeater_move_down' => 'Move item down',
271 + 'repeater_remove_item' => 'Remove item',
269 272 'required_label' => 'Required',
270 273 'tom_select_no_results' => 'No results found for "%s"',
271 274 'search_placeholder' => 'Search settings',
272 275 'search_no_results' => 'No settings found. Try a different search term.',
@@ -654,9 +657,18 @@
654 657 $id = $args['id'];
655 658 $name = $args['name'];
656 659 $type = isset( $args['type'] ) ? $args['type'] : 'text';
657 660 $callback = method_exists( $this->settings_form, "callback_{$type}" ) ? array( $this->settings_form, "callback_{$type}" ) : array( $this->settings_form, 'callback_missing' );
661 + $title = $name;
658 662
663 + if ( ! in_array( $type, array( 'header', 'repeater' ), true ) ) {
664 + $title = sprintf(
665 + '<label for="%1$s">%2$s</label>',
666 + esc_attr( $this->settings_form->get_field_id( $args ) ),
667 + wp_kses_post( $name )
668 + );
669 + }
670 +
659 671 // Tag header rows so the settings search can group fields under them.
660 672 if ( 'header' === $type ) {
661 673 $args['class'] = trim( ( $args['class'] ?? '' ) . ' wz-settings-header-row', " \t\n\r\0\x0B" );
662 674 }
@@ -662,9 +674,9 @@
662 674 }
663 675
664 676 add_settings_field(
665 677 "{$settings_key}[{$id}]", // ID of the settings field. We save it within the settings array.
666 - $name, // Label of the setting.
678 + $title, // Label of the setting.
667 679 $callback, // Function to handle the setting.
668 680 "{$settings_key}_{$section}", // Page to display the setting. In our case it is the section as defined above.
669 681 "{$settings_key}_{$section}", // Name of the section.
670 682 $args