nxs_rePostToTR_ajax

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

Description

nxs_rePostToTR_ajax(); 

Usage

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

Defined (1)

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

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