jetpack_extras_sharing_permalink

The Custom Tweaks for Jetpack by BarryCarlyon jetpack extras sharing permalink function.

Description

jetpack_extras_sharing_permalink( $url, $post_id, $button ); 

Parameters (3)

0. $url
The url.
1. $post_id
The post id.
2. $button
The button.

Usage

  1. if ( !function_exists( 'jetpack_extras_sharing_permalink' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'custom-tweaks-for-jetpack-by-barrycarlyon/modules/sharedaddy/sharing-extras.php'; 
  3.  
  4. // The url. 
  5. $url = null; 
  6.  
  7. // The post id. 
  8. $post_id = null; 
  9.  
  10. // The button. 
  11. $button = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = jetpack_extras_sharing_permalink($url, $post_id, $button); 
  15.  

Defined (1)

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

/modules/sharedaddy/sharing-extras.php  
  1. function jetpack_extras_sharing_permalink($url, $post_id, $button) { 
  2. if ($button != 'twitter') { 
  3. return $url; 
  4. if (function_exists('wpme_get_shortlink')) { 
  5. $global = get_option( 'jetpack_extras-options', array() ); 
  6. if ($global['use_wpme']) { 
  7. $url = wpme_get_shortlink($post_id); 
  8. return $url;