aioseop_ajax_save_url

The All In One SEO Pack aioseop ajax save url function.

Description

aioseop_ajax_save_url(); 

Usage

  1. if ( !function_exists( 'aioseop_ajax_save_url' ) ) { 
  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_save_url(); 
  7.  

Defined (1)

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

/inc/aioseop_functions.php  
  1. function aioseop_ajax_save_url() { 
  2. $options = Array(); 
  3. parse_str( $_POST['options'], $options ); 
  4. foreach ( $options as $k => $v ) { 
  5. $_POST[ $k ] = $v; 
  6. $_POST['action'] = 'aiosp_update_module'; 
  7. global $aiosp, $aioseop_modules; 
  8. $aiosp->admin_menu(); 
  9. if ( ! empty( $_POST['settings'] ) && ( $_POST['settings'] === 'video_sitemap_addl_pages' ) ) { 
  10. $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Video_Sitemap' ); 
  11. } elseif ( ! empty( $_POST['settings'] ) && ( $_POST['settings'] === 'news_sitemap_addl_pages' ) ) { 
  12. $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_News_Sitemap' ); 
  13. } else { 
  14. $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Sitemap' ); 
  15. $_POST['location'] = null; 
  16. $_POST['Submit'] = 'ajax'; 
  17. $module->add_page_hooks(); 
  18. $prefix = $module->get_prefix(); 
  19. $_POST = $module->get_current_options( $_POST, null ); 
  20. $module->handle_settings_updates( null ); 
  21. $options = $module->get_current_options( Array(), null ); 
  22. $output = $module->display_custom_options( '', Array( 
  23. 'name' => $prefix . 'addl_pages',  
  24. 'type' => 'custom',  
  25. 'save' => true,  
  26. 'value' => $options[ $prefix . 'addl_pages' ],  
  27. 'attr' => '',  
  28. ) ); 
  29. $output = str_replace( "'", "\'", $output ); 
  30. $output = str_replace( "\n", '\n', $output ); 
  31. die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );