nxs_rePostToPN_ajax

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

Description

nxs_rePostToPN_ajax(); 

Usage

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

Defined (1)

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

/inc-cl/pn.php  
  1. function nxs_rePostToPN_ajax() { check_ajax_referer('nxsSsPageWPN'); $postID = $_POST['id']; $options = get_option('NS_SNAutoPoster');  
  2. foreach ($options['pn'] as $ii=>$two) if ($ii==$_POST['nid']) { $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['gpPageID'].$two['gpUName']==$_POST['nid']) {  
  3. $po = get_post_meta($postID, 'snapPN', true); $po = maybe_unserialize($po);// prr($gppo); 
  4. if (is_array($po) && isset($po[$ii]) && is_array($po[$ii])) { $ntClInst = new nxs_snapClassPN(); $two = $ntClInst->adjMetaOpt($two, $po[$ii]); } 
  5. $result = nxs_doPublishToPN($postID, $two); if ($result == 200) die("Successfully sent your post to Pinterest."); else die($result);  
  6. }