function nxs_snapAjax() { check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) { return; } $options = $plgn_NS_SNAutoPoster->nxs_options; 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(); $ntObj->showNTSettings($ii, $pbo); } if ($_POST['nxsact'] == 'svEdFlds') { $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]; $savedMeta = maybe_unserialize(get_post_meta($id, 'snap' . $ntU, true)); $savedMeta[$ii][$fname] = $_POST['cval']; prr($savedMeta); delete_post_meta($id, 'snap' . $ntU); add_post_meta($id, 'snap' . $ntU, str_replace('\\', '\\\\', serialize($savedMeta))); } if ($_POST['nxsact'] == 'getNewPostDlg') { nxs_showNewPostForm($options); } if ($_POST['nxsact'] == 'doNewPost') { nxs_doNewNPPost($options); } if ($_POST['nxsact'] == 'nxsCptCheckGP') { nxs_CptCheckGP($options); } die; }
function nxs_snapAjax() { check_ajax_referer('nxsSsPageWPN'); global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) { return; } $options = $plgn_NS_SNAutoPoster->nxs_options; 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(); $ntObj->showNTSettings($ii, $pbo); } if ($_POST['nxsact'] == 'getNewPostDlg') { nxs_showNewPostForm($options); } if ($_POST['nxsact'] == 'doNewPost') { nxs_doNewNPPost($options); } if ($_POST['nxsact'] == 'nxsCptCheckGP') { nxs_CptCheckGP($options); } die; }