publicize_init

Helper for grabbing a Publicize object from the "front-end" (non-admin) of a site.

Description

publicize_init(); 

Normally Publicize is only loaded in wp-admin, so there's a little set up that you might need to do if you want to use it on the front end. Just call this function and it returns a Publicize object.


Usage

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

Defined (1)

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

/modules/publicize.php  
  1. function publicize_init() { 
  2. global $publicize; 
  3.  
  4. if ( ! class_exists( 'Publicize' ) ) { 
  5. require_once dirname( __FILE__ ) . '/publicize/publicize.php'; 
  6.  
  7. return $publicize;