nxs_saveSiteSets_ajax

The WordPress Core nxs saveSiteSets ajax function.

Description

nxs_saveSiteSets_ajax(); 

Usage

  1. if ( !function_exists( 'nxs_saveSiteSets_ajax' ) ) { 
  2. require_once '/NextScripts_SNAP.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = nxs_saveSiteSets_ajax(); 
  7.  

Defined (1)

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

/NextScripts_SNAP.php  
  1. function nxs_saveSiteSets_ajax() { check_ajax_referer('nxssnap');  
  2. if ($_POST['sid']=='A') { global $wpdb; $allBlogs = $wpdb->get_results("SELECT blog_id FROM wp_blogs where blog_id > 1"); 
  3. foreach( $allBlogs as $aBlog ) { switch_to_blog($aBlog->blog_id);  
  4. $options = get_option('NS_SNAutoPoster'); $options['suaMode'] = $_POST['sset']; update_option('NS_SNAutoPoster', $options); 
  5. }  
  6. } else { switch_to_blog($_POST['sid']);  
  7. $options = get_option('NS_SNAutoPoster'); $options['suaMode'] = $_POST['sset']; if( is_super_admin() && $_POST['sid']=='1' && $options['suaMode']!='O') $options['suaMode'] = 'O'; update_option('NS_SNAutoPoster', $options);  
  8. echo "OK"; die();