Created
January 4, 2018 14:53
-
-
Save jchristopher/e4d48d8f3417383ed77524295a005749 to your computer and use it in GitHub Desktop.
Create a custom SearchWP settings screen tab
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment