Skip to content

Commit

Permalink
Reset status query var for another tab
Browse files Browse the repository at this point in the history
  • Loading branch information
thobk committed Feb 15, 2019
1 parent 62061ad commit dfa3934
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/helper/class-ms-helper-html.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,13 @@ public static function html_admin_vertical_tabs( $tabs, $active_tab = null, $per
$url = $tab['url'];
$attributes = array();

$url = remove_query_arg( 'status', $url );

foreach ( $persistent as $param ) {
mslib3()->array->equip_request( $param );
$value = $_REQUEST[ $param ];
$url = esc_url_raw(
add_query_arg( $param, $value, $url )
);

$url = add_query_arg( $param, $value, $url );
}

$attributes[] = 'class="ms-tab-link"';
Expand Down
2 changes: 1 addition & 1 deletion premium/addon/searchindex/class-ms-addon-searchindex.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public function is_base_type( $result, $membership_type ) {
$result = true;

// but should be visible in protection tab
if( isset( $_GET['page'] ) && $_GET['page'] === MS_Controller_Plugin::MENU_SLUG .'-protection' ){
if( MS_Controller_Plugin::is_page( 'protection' ) ){
$result = false;
}
}
Expand Down

0 comments on commit dfa3934

Please sign in to comment.