nxs_snapAjax

The NextScripts: Social Networks Auto-Poster nxs snapAjax function.

Description

nxs_snapAjax(); 

Usage

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

Defined (1)

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

/NextScripts_SNAP.php  
  1. if (!function_exists("nxs_snapAjax")) { function nxs_snapAjax() { check_ajax_referer('nxsSsPageWPN'); $arg = ''; 
  2. global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;  
  3. if ($_POST['nxsact']=='getNTset') {$ii = $_POST['ii'];$nt = $_POST['nt'];$ntl = strtolower($nt); $pbo = $options[$ntl][$ii]; $pbo['ntInfo']['lcode'] = $ntl; $clName = 'nxs_snapClass'.$nt; $ntObj = new $clName();  
  4. $ntObj->showNTSettings($ii, $pbo);  
  5. if ($_POST['nxsact']=='svEdFlds') {  
  6. $cn = str_replace(']', '', $_POST['cname']); $cna = explode('[', $cn); prr($cna); $id = $_POST['pid']; $nt = $cna[0]; $ntU = strtoupper($nt); $ii = $cna[1]; $fname = $cna[2]; 
  7. $savedMeta = maybe_unserialize(get_post_meta($id, 'snap'.$ntU, true)); $savedMeta[$ii][$fname] = $_POST['cval']; prr($savedMeta); 
  8. delete_post_meta($id, 'snap'.$ntU); add_post_meta($id, 'snap'.$ntU, str_replace('\\', '\\\\', serialize($savedMeta)));  
  9. if ($_POST['nxsact']=='getNewPostDlg') nxs_showNewPostForm($options); 
  10. if ($_POST['nxsact']=='doNewPost') nxs_doNewNPPost($options); 
  11. if ($_POST['nxsact']=='nxsCptCheckGP') nxs_CptCheckGP($options);  
  12. do_action( 'nxsajax', $arg );  
  13. die(); 
  14. }}