nxs_rePostToBG_ajax

The NextScripts: Social Networks Auto-Poster nxs rePostToBG ajax function.

Description

nxs_rePostToBG_ajax(); 

Usage

  1. if ( !function_exists( 'nxs_rePostToBG_ajax' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/inc-cl/bg.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = nxs_rePostToBG_ajax(); 
  7.  

Defined (1)

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

/inc-cl/bg.php  
  1. if (!function_exists("nxs_rePostToBG_ajax")) { function nxs_rePostToBG_ajax() { check_ajax_referer('nxsSsPageWPN'); $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);  
  2. global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;  
  3. foreach ($options['bg'] as $ii=>$po) if ($ii==$_POST['nid']) { $po['ii'] = $ii; $po['pType'] = 'aj'; 
  4. $mpo = get_post_meta($postID, 'snapBG', true); $mpo = maybe_unserialize($mpo);  
  5. if (is_array($mpo) && isset($mpo[$ii]) && is_array($mpo[$ii]) ) { $ntClInst = new nxs_snapClassBG(); $po = $ntClInst->adjMetaOpt($po, $mpo[$ii]); }  
  6. $result = nxs_doPublishToBG($postID, $po); if ($result === 200) nxs_save_glbNtwrks('bg', $ii, 1, 'bgOK');  
  7. if ($result == 200) die("Successfully sent your post to Blogger."); else die($result); 
  8. }