Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * This function will display a pretty list of the widgets currently
- * included by Jetpack. Note that it stops WordPress execution
- * at this stage.
- */
- add_filter( 'jetpack_widgets_to_include', 'list_jetpack_widgets' );
- function list_jetpack_widgets( $widgets ) {
- ?><pre><?php print_r( $widgets ); ?></pre><?php
- exit;
- }
- /*
- * This function removes the Facebook Likebox from the list of widgets
- * that Jetpack includes.
- */
- add_filter( 'jetpack_widgets_to_include', 'filter_jetpack_widgets' );
- function filter_jetpack_widgets( $widgets ) {
- if ( ! is_array( $widgets ) )
- return;
- $filtered_widgets = array();
- foreach ( $widgets as $widget ) {
- if ( stristr( $widget, 'facebook-likebox.php' ) )
- continue;
- $filtered_widgets[] = $widget;
- }
- return $filtered_widgets;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement