@@ -179,7 +179,7 @@ public function __construct( $settings_key, $prefix, $args ) {
179179 public function hooks () {
180180 add_action ( 'admin_menu ' , array ( $ this , 'admin_menu ' ), 11 );
181181 add_action ( 'admin_init ' , array ( $ this , 'admin_init ' ) );
182- add_action ( 'admin_footer_text ' , array ( $ this , 'admin_footer_text ' ) );
182+ add_filter ( 'admin_footer_text ' , array ( $ this , 'admin_footer_text ' ) );
183183 add_action ( 'admin_enqueue_scripts ' , array ( $ this , 'admin_enqueue_scripts ' ) );
184184 }
185185
@@ -639,7 +639,7 @@ public function get_field_description( $args ) {
639639 * After Settings Output filter
640640 *
641641 * @param string $desc Description of the field.
642- * @param array Arguments array.
642+ * @param array $args Arguments array.
643643 */
644644 $ desc = apply_filters ( $ this ->prefix . '_setting_field_description ' , $ desc , $ args );
645645 return $ desc ;
@@ -689,7 +689,7 @@ public function callback_header( $args ) {
689689 * After Settings Output filter
690690 *
691691 * @param string $html HTML string.
692- * @param array Arguments array.
692+ * @param array $args Arguments array.
693693 */
694694 echo apply_filters ( $ this ->prefix . '_after_setting_output ' , $ html , $ args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
695695 }
@@ -1027,9 +1027,9 @@ public function callback_number( $args ) {
10271027
10281028 $ html = sprintf (
10291029 '<input type="number" step="%1$s" max="%2$s" min="%3$s" class="%4$s" id="%8$s[%5$s]" name="%8$s[%5$s]" value="%6$s" %7$s /> ' ,
1030- esc_attr ( $ step ),
1031- esc_attr ( $ max ),
1032- esc_attr ( $ min ),
1030+ esc_attr ( ( string ) $ step ),
1031+ esc_attr ( ( string ) $ max ),
1032+ esc_attr ( ( string ) $ min ),
10331033 sanitize_html_class ( $ size ) . '-text ' ,
10341034 sanitize_key ( $ args ['id ' ] ),
10351035 esc_attr ( stripslashes ( $ value ) ),
@@ -1059,7 +1059,7 @@ public function callback_select( $args ) {
10591059 $ chosen = '' ;
10601060 }
10611061
1062- $ html = sprintf ( '<select id="%1$s[%2$s]" name="%1$s[%2$s]" %2 $s /> ' , $ this ->settings_key , sanitize_key ( $ args ['id ' ] ), $ chosen );
1062+ $ html = sprintf ( '<select id="%1$s[%2$s]" name="%1$s[%2$s]" %3 $s /> ' , $ this ->settings_key , sanitize_key ( $ args ['id ' ] ), $ chosen );
10631063
10641064 foreach ( $ args ['options ' ] as $ option => $ name ) {
10651065 $ html .= sprintf ( '<option value="%1$s" %2$s>%3$s</option> ' , sanitize_key ( $ option ), selected ( $ option , $ value , false ), $ name );
@@ -1325,13 +1325,12 @@ public function settings_sanitize( $input ) {
13251325 if ( ! isset ( $ input [ $ key ] ) ) {
13261326 unset( $ output [ $ key ] );
13271327 }
1328- }
13291328
1330- // Delete any settings that are no longer part of our registered settings.
1331- if ( array_key_exists ( $ key , $ output ) && ! array_key_exists ( $ key , $ settings_types ) ) {
1332- unset( $ output [ $ key ] );
1329+ // Delete any settings that are no longer part of our registered settings.
1330+ if ( array_key_exists ( $ key , $ output ) && ! array_key_exists ( $ key , $ settings_types ) ) {
1331+ unset( $ output [ $ key ] );
1332+ }
13331333 }
1334-
13351334 add_settings_error ( $ this ->prefix . '-notices ' , '' , $ this ->translation_strings ['success_message ' ], 'updated ' );
13361335
13371336 /**
@@ -1395,7 +1394,7 @@ public function sanitize_text_field( $value ) {
13951394 /**
13961395 * Sanitize number fields
13971396 *
1398- * @param array $value The field value.
1397+ * @param string $value The field value.
13991398 * @return string $value Sanitized value
14001399 */
14011400 public function sanitize_number_field ( $ value ) {
@@ -1579,7 +1578,7 @@ public function show_navigation() {
15791578
15801579 $ active = $ active_tab === $ tab_id ? ' ' : '' ;
15811580
1582- $ html .= '<li><a href="# ' . esc_attr ( $ tab_id ) . '" title=" ' . esc_attr ( $ tab_name ) . '" class="nav-tab ' . sanitize_html_class ( $ active ) . '"> ' ;
1581+ $ html .= '<li style="margin-bottom:0;" ><a href="# ' . esc_attr ( $ tab_id ) . '" title=" ' . esc_attr ( $ tab_name ) . '" class="nav-tab ' . sanitize_html_class ( $ active ) . '"> ' ;
15831582 $ html .= esc_html ( $ tab_name );
15841583 $ html .= '</a></li> ' ;
15851584
@@ -1691,7 +1690,6 @@ public function settings_help() {
16911690 $ screen ->add_help_tab ( $ tab );
16921691 }
16931692 }
1694-
16951693 }
16961694
16971695endif ;
0 commit comments