sharing_add_header

The Jetpack by WordPress.com sharing add header function.

Description

sharing_add_header(); 

Usage

  1. if ( !function_exists( 'sharing_add_header' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/sharedaddy/sharing-service.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = sharing_add_header(); 
  7.  

Defined (1)

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

/modules/sharedaddy/sharing-service.php  
  1. function sharing_add_header() { 
  2. $sharer = new Sharing_Service(); 
  3. $enabled = $sharer->get_blog_services(); 
  4.  
  5. foreach ( array_merge( $enabled['visible'], $enabled['hidden'] ) AS $service ) { 
  6. $service->display_header(); 
  7.  
  8. if ( count( $enabled['all'] ) > 0 && sharing_maybe_enqueue_scripts() ) { 
  9. wp_enqueue_style( 'sharedaddy', plugin_dir_url( __FILE__ ) .'sharing.css', array(), JETPACK__VERSION ); 
  10. wp_enqueue_style( 'genericons' ); 
  11.