jetpack_extras_init

Load extra sharing sources.

Description

jetpack_extras_init(); 

Usage

  1. if ( !function_exists( 'jetpack_extras_init' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'custom-tweaks-for-jetpack-by-barrycarlyon/jetpack_extras.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_extras_init(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/jetpack_extras.php  
  1. function jetpack_extras_init() { 
  2. if (class_exists('Sharing_Source')) { 
  3.  
  4. if ( is_admin() ) { 
  5. // admin 
  6. require_once( JETPACK_EXTRAS_PLUGIN_DIR_PATH . 'modules/sharedaddy/admin.php' ); 
  7. } else { 
  8. require_once( JETPACK_EXTRAS_PLUGIN_DIR_PATH . 'modules/sharedaddy/sharing-display.php' ); 
  9.  
  10. // remove core 
  11. remove_filter( 'the_content', 'sharing_display', 19 ); 
  12. remove_filter( 'the_excerpt', 'sharing_display', 19 ); 
  13.  
  14. // add extra 
  15. add_filter( 'the_content', 'sharing_display_extra', 19 ); 
  16. add_filter( 'the_excerpt', 'sharing_display_extra', 19 ); 
  17.  
  18. // sharing extras 
  19. require_once( JETPACK_EXTRAS_PLUGIN_DIR_PATH . 'modules/sharedaddy/sharing-extras.php' ); 
  20. } else { 
  21. add_action('after_plugin_row_' . JETPACK_META_BASENAME, 'jetpack_extras_after_plugin_row', 10, 3);