nxs_rePostToPK_ajax

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

Description

nxs_rePostToPK_ajax(); 

Usage

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

Defined (1)

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

/inc-cl/pk.php  
  1. if (!function_exists("nxs_rePostToPK_ajax")) { function nxs_rePostToPK_ajax() { check_ajax_referer('nxsSsPageWPN'); $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);  
  2. $options = get_option('NS_SNAutoPoster'); foreach ($options['pk'] as $ii=>$po) if ($ii==$_POST['nid']) { $po['ii'] = $ii; $po['pType'] = 'aj'; 
  3. $mpo = get_post_meta($postID, 'snapPK', true); $mpo = maybe_unserialize($mpo);  
  4. if (is_array($mpo) && isset($mpo[$ii]) && is_array($mpo[$ii]) ) { $ntClInst = new nxs_snapClassPK(); $po = $ntClInst->adjMetaOpt($po, $mpo[$ii]); } 
  5. $result = nxs_doPublishToPK($postID, $po); if ($result == 200 || $result == 201) die("Your post has been successfully sent to Plurk."); else { echo $result; die(); } 
  6. }