Last active
June 20, 2019 04:51
-
-
Save wplit/fa5e9de899f093a7ed26cdba564db277 to your computer and use it in GitHub Desktop.
Adds quick link to resign shortcodes in admin bar, useful when moving between staging - dev areas when using Oxygen
This file contains hidden or 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
| add_action( 'admin_bar_menu', 'lit_resign_adminbar_item', 1002 ); | |
| /** | |
| * Adds "Resign" menu item in the WordPress admin bar. | |
| * | |
| * @param WP_Admin_Bar $admin_bar WP_Admin_Bar instance, passed by reference. | |
| */ | |
| function lit_resign_adminbar_item( $admin_bar ) { | |
| if( !class_exists( 'CT_Component' ) ) { | |
| return; | |
| } | |
| $admin_bar->add_menu( | |
| array( | |
| 'id' => 'resign', | |
| 'title' => 'Resign', | |
| 'href' => admin_url( 'admin.php?page=oxygen_vsb_sign_shortcodes' ), | |
| 'meta' => array( | |
| 'title' => __( 'Oxygen Resign Shortcodes' ), | |
| ), | |
| ) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment