nxs_fbembed

The NextScripts: Social Networks Auto-Poster nxs fbembed shortcode.


Usage

  1. // basic usage 
  2. echo do_shortcode('[nxs_fbembed]'); 
  1. // variable usage 
  2. $result = do_shortcode('[nxs_fbembed]'); 
  3. echo $result;  

Defined (1)

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

/inc-cl/fb.php  
  1. $fbpoA = explode('_', $fbpo); $fpg = $fbpoA[0]; $fpid = $fbpoA[1];  
  2. $txtOut = '<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script> 
  3. <div class="fb-post" data-href="https://www.facebook.com/permalink.php?story_fbid='.$fpid.'&id='.$fpg.'"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/permalink.php?story_fbid='.$fpid.'&id='.$fpg.'">Post</a></div></div>'; 
  4. return $txtOut; 
  5. if (function_exists("add_shortcode")) add_shortcode( 'nxs_fbembed', 'nxs_fbembed_func' ); 
  6.  
  7. if (!function_exists("nxs_rePostToFB_ajax")) { function nxs_rePostToFB_ajax() { check_ajax_referer('nxsSsPageWPN'); $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);  
  8. $options = get_option('NS_SNAutoPoster'); foreach ($options['fb'] as $ii=>$fbo) if ($ii==$_POST['nid']) { $fbo['ii'] = $ii; $fbo['pType'] = 'aj'; 
  9. $fbpo = get_post_meta($postID, 'snapFB', true); /** echo $postID."|"; echo $fbpo; */ $fbpo = maybe_unserialize($fbpo); //prr($fbpo);  
  10. if (is_array($fbpo) && isset($fbpo[$ii]) && is_array($fbpo[$ii]) ) { $ntClInst = new nxs_snapClassFB(); $fbo = $ntClInst->adjMetaOpt($fbo, $fbpo[$ii]); } //prr($fbo);