Skip to content

Commit

Permalink
Fix conflict with Cyr2Lat.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jul 17, 2023
1 parent 8c4518e commit a40982d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/php/Settings/Abstracts/SettingsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public function __construct( $tabs = [] ) {

if ( ! $this->is_tab() ) {
add_action( 'current_screen', [ $this, 'setup_tabs_section' ], 9 );
add_action( 'admin_menu', [ $this, 'add_settings_page' ] );
}

$this->init();
Expand Down Expand Up @@ -197,7 +198,6 @@ protected function init_hooks() {
[ $this, 'add_settings_link' ]
);

add_action( 'admin_menu', [ $this, 'add_settings_page' ] );
add_action( 'current_screen', [ $this, 'setup_fields' ] );
add_action( 'current_screen', [ $this, 'setup_sections' ], 11 );

Expand Down Expand Up @@ -535,6 +535,12 @@ private function tab_link( $tab ) {
* @return bool
*/
protected function is_tab_active( $tab ) {
$current_page_name = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS );

if ( $current_page_name !== $this->option_page() ) {
return false;
}

$current_tab_name = filter_input( INPUT_GET, 'tab', FILTER_SANITIZE_FULL_SPECIAL_CHARS );

if ( null === $current_tab_name ) {
Expand Down

0 comments on commit a40982d

Please sign in to comment.