nxs_rePostToRD_ajax

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

Description

nxs_rePostToRD_ajax(); 

Usage

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

Defined (1)

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

/inc-cl/rd.php  
  1. function nxs_rePostToRD_ajax() { check_ajax_referer('nxsSsPageWPN'); $postID = $_POST['id']; global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;  
  2. foreach ($options['rd'] as $ii=>$two) if ($ii==$_POST['nid']) { $two['ii'] = $ii; $two['pType'] = 'aj'; //if ($two['rdPageID'].$two['rdUName']==$_POST['nid']) {  
  3. $rdpo = get_post_meta($postID, 'snapRD', true); $rdpo = maybe_unserialize($rdpo);// prr($rdpo); 
  4. if (is_array($rdpo) && isset($rdpo[$ii]) && is_array($rdpo[$ii])) { $ntClInst = new nxs_snapClassRD(); $two = $ntClInst->adjMetaOpt($two, $rdpo[$ii]); }  
  5. $result = nxs_doPublishToRD($postID, $two); if ($result == 200) die("Successfully sent your post to Reddit."); else die($result);  
  6. }