Last active
July 24, 2016 07:43
-
-
Save joje47/d197c8f92e65e1e1333c841b5b73646e to your computer and use it in GitHub Desktop.
Shows registered widgets in wordpress, so it's easier to get their names, and remove them at will.
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( 'wp_footer', function() // works best, but does not show up if the footer is removed.. | |
| // add_action( 'admin_menu', function() // Hides a bit, but copy and past to textfile to read | |
| { | |
| if ( empty ( $GLOBALS['wp_widget_factory'] ) ) | |
| return; | |
| $widgets = array_keys( $GLOBALS['wp_widget_factory']->widgets ); | |
| print '<pre>$widgets = ' . esc_html( var_export( $widgets, TRUE ) ) . '</pre>'; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment