aioseop_ajax_init

The All In One SEO Pack aioseop ajax init function.

Description

aioseop_ajax_init(); 

Usage

  1. if ( !function_exists( 'aioseop_ajax_init' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/inc/aioseop_functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = aioseop_ajax_init(); 
  7.  

Defined (1)

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

/inc/aioseop_functions.php  
  1. function aioseop_ajax_init() { 
  2. if ( ! empty( $_POST ) && ! empty( $_POST['settings'] ) && ( ! empty( $_POST['nonce-aioseop'] ) || ( ! empty( $_POST['nonce-aioseop-edit'] ) ) ) && ! empty( $_POST['options'] ) ) { 
  3. $_POST = stripslashes_deep( $_POST ); 
  4. $settings = esc_attr( $_POST['settings'] ); 
  5. if ( ! defined( 'AIOSEOP_AJAX_MSG_TMPL' ) ) { 
  6. define( 'AIOSEOP_AJAX_MSG_TMPL', "jQuery('div#aiosp_$settings').fadeOut('fast', function() {jQuery('div#aiosp_$settings').html('%s').fadeIn('fast');});" ); 
  7.  
  8. if ( ! wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) ) { 
  9. die( sprintf( AIOSEOP_AJAX_MSG_TMPL, __( 'Unauthorized access; try reloading the page.', 'all-in-one-seo-pack' ) ) ); 
  10. } else { 
  11. die( 0 );