Available since: 2.6
searchwp_settings_nav_tab
SearchWP’s settings header includes tabs for all SearchWP settings screen. This action is used to insert a tab into that header navigation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add custom SearchWP settings tab | |
add_action( 'searchwp_settings_nav_tab', function() { | |
if ( current_user_can( 'manage_options' ) ) { | |
searchwp_get_nav_tab( array( | |
'tab' => 'custom', // tab name | |
'label' => __( 'My Custom Tab', 'searchwp' ), // tab label | |
) ); | |
} | |
}, 300 ); // priority controls placement of tab among other tabs |