nxs_rePostToVK_ajax

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

Description

nxs_rePostToVK_ajax(); 

Usage

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

Defined (1)

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

/inc-cl/vk.php  
  1. if (!function_exists("nxs_rePostToVK_ajax")) { function nxs_rePostToVK_ajax() { check_ajax_referer('nxsSsPageWPN'); $postID = $_POST['id']; // $result = nsPublishTo($id, 'VK', true);  
  2. $options = get_option('NS_SNAutoPoster'); foreach ($options['vk'] as $ii=>$nto) if ($ii==$_POST['nid']) { $nto['ii'] = $ii; $nto['pType'] = 'aj'; 
  3. $ntpo = get_post_meta($postID, 'snapVK', true); /** echo $postID."|"; echo $fbpo; */ $ntpo = maybe_unserialize($ntpo); // prr($ntpo);  
  4. if (is_array($ntpo) && isset($ntpo[$ii]) && is_array($ntpo[$ii]) ) { $ntClInst = new nxs_snapClassVK(); $nto = $ntClInst->adjMetaOpt($nto, $ntpo[$ii]); } //prr($nto); 
  5. $result = nxs_doPublishToVK($postID, $nto); if ($result == 200) die("Successfully sent your post to vKontakte(VK)."); else die($result); 
  6. }