aioseop_ajax_delete_url

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

Description

aioseop_ajax_delete_url(); 

Usage

  1. if ( !function_exists( 'aioseop_ajax_delete_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_delete_url(); 
  7.  

Defined (1)

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

/inc/aioseop_functions.php  
  1. function aioseop_ajax_delete_url() { 
  2. $options = Array(); 
  3. $options = esc_attr( $_POST['options'] ); 
  4. $_POST['action'] = 'aiosp_update_module'; 
  5. global $aiosp, $aioseop_modules; 
  6. $aiosp->admin_menu(); 
  7. $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Sitemap' ); 
  8. $_POST['location'] = null; 
  9. $_POST['Submit'] = 'ajax'; 
  10. $module->add_page_hooks(); 
  11. $_POST = (Array) $module->get_current_options( $_POST, null ); 
  12. if ( ! empty( $_POST['aiosp_sitemap_addl_pages'] ) && is_object( $_POST['aiosp_sitemap_addl_pages'] ) ) { 
  13. $_POST['aiosp_sitemap_addl_pages'] = (Array) $_POST['aiosp_sitemap_addl_pages']; 
  14. if ( ! empty( $_POST['aiosp_sitemap_addl_pages'] ) && ( ! empty( $_POST['aiosp_sitemap_addl_pages'][ $options ] ) ) ) { 
  15. unset( $_POST['aiosp_sitemap_addl_pages'][ $options ] ); 
  16. if ( empty( $_POST['aiosp_sitemap_addl_pages'] ) ) { 
  17. $_POST['aiosp_sitemap_addl_pages'] = ''; 
  18. } else { 
  19. $_POST['aiosp_sitemap_addl_pages'] = json_encode( $_POST['aiosp_sitemap_addl_pages'] ); 
  20. $module->handle_settings_updates( null ); 
  21. $options = $module->get_current_options( Array(), null ); 
  22. $output = $module->display_custom_options( '', Array( 
  23. 'name' => 'aiosp_sitemap_addl_pages',  
  24. 'type' => 'custom',  
  25. 'save' => true,  
  26. 'value' => $options['aiosp_sitemap_addl_pages'],  
  27. 'attr' => '',  
  28. ) ); 
  29. $output = str_replace( "'", "\'", $output ); 
  30. $output = str_replace( "\n", '\n', $output ); 
  31. } else { 
  32. $output = sprintf( __( 'Row %s not found; no rows were deleted.', 'all-in-one-seo-pack' ), esc_attr( $options ) ); 
  33. die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );