From 54a4c39b4d631ad89e43236aab8304dcd4c13931 Mon Sep 17 00:00:00 2001 From: "Rafasashi\\Raphael" Date: Sat, 21 Sep 2024 10:56:08 +0200 Subject: [PATCH] settings updated --- ...ass-wordpress-plugin-template-settings.php | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/includes/class-wordpress-plugin-template-settings.php b/includes/class-wordpress-plugin-template-settings.php index 06e4a42..c04e46c 100644 --- a/includes/class-wordpress-plugin-template-settings.php +++ b/includes/class-wordpress-plugin-template-settings.php @@ -430,8 +430,8 @@ public function settings_page() { $tab_link = remove_query_arg( 'settings-updated', $tab_link ); } - // Output tab. - $html .= '' . esc_html( $data['title'] ) . '' . "\n"; + // Output tab + $html .= '' . ( !empty($data['logo']) ? '' : '' ) . wp_kses_normalize_entities($data['title']) . '' . "\n"; ++$c; } @@ -439,8 +439,6 @@ public function settings_page() { $html .= '' . "\n"; } - if( $this->settings[$tab]['fields'] ){ - $html .= '
' . "\n"; // Get settings fields. @@ -449,14 +447,17 @@ public function settings_page() { do_settings_sections( $this->parent->_token . '_settings' ); $html .= ob_get_clean(); - $html .= '

' . "\n"; - $html .= '' . "\n"; - $html .= '' . "\n"; - $html .= '

' . "\n"; - $html .= '
' . "\n"; - } - - $html .= '' . "\n"; + if( $this->settings[$tab]['fields'] ){ + + $html .= '

' . "\n"; + $html .= '' . "\n"; + $html .= '' . "\n"; + $html .= '

' . "\n"; + } + + $html .= '' . "\n"; + + $html .= '' . "\n"; echo wp_kses_normalize_entities($html); //phpcs:ignore }