aioseop_ajax_init
The All In One SEO Pack aioseop ajax init function.
Description
aioseop_ajax_init();
Usage
if ( !function_exists( 'aioseop_ajax_init' ) ) { require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/inc/aioseop_functions.php'; } // NOTICE! Understand what this does before running. $result = aioseop_ajax_init();
Defined (1)
The function is defined in the following location(s).
- /inc/aioseop_functions.php
- function aioseop_ajax_init() {
- if ( ! empty( $_POST ) && ! empty( $_POST['settings'] ) && ( ! empty( $_POST['nonce-aioseop'] ) || ( ! empty( $_POST['nonce-aioseop-edit'] ) ) ) && ! empty( $_POST['options'] ) ) {
- $_POST = stripslashes_deep( $_POST );
- $settings = esc_attr( $_POST['settings'] );
- if ( ! defined( 'AIOSEOP_AJAX_MSG_TMPL' ) ) {
- define( 'AIOSEOP_AJAX_MSG_TMPL', "jQuery('div#aiosp_$settings').fadeOut('fast', function() {jQuery('div#aiosp_$settings').html('%s').fadeIn('fast');});" );
- }
- if ( ! wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) ) {
- die( sprintf( AIOSEOP_AJAX_MSG_TMPL, __( 'Unauthorized access; try reloading the page.', 'all-in-one-seo-pack' ) ) );
- }
- } else {
- die( 0 );
- }
- }