Guest User

Untitled

a guest
Apr 26th, 2013
219
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /*
  4.  *  This function will display a pretty list of the widgets currently
  5.  *  included by Jetpack. Note that it stops WordPress execution
  6.  *  at this stage.
  7.  */
  8. add_filter( 'jetpack_widgets_to_include', 'list_jetpack_widgets' );
  9.  
  10. function list_jetpack_widgets( $widgets ) {
  11.     ?><pre><?php print_r( $widgets ); ?></pre><?php
  12.     exit;
  13. }
  14.  
  15. /*
  16.  *  This function removes the Facebook Likebox from the list of widgets
  17.  *  that Jetpack includes.
  18.  */
  19. add_filter( 'jetpack_widgets_to_include', 'filter_jetpack_widgets' );
  20.  
  21. function filter_jetpack_widgets( $widgets ) {
  22.     if ( ! is_array( $widgets ) )
  23.         return;
  24.    
  25.     $filtered_widgets = array();
  26.    
  27.     foreach ( $widgets as $widget ) {
  28.         if ( stristr( $widget, 'facebook-likebox.php' ) )
  29.             continue;
  30.            
  31.         $filtered_widgets[] = $widget;
  32.     }
  33.    
  34.     return $filtered_widgets;
  35. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×