WordPress.org

Make WordPress Core

Ticket #8420: temp-patch.diff

File temp-patch.diff, 1.4 KB (added by kapeels, 3 years ago)
  • wp-includes/functions.php

    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
     
    26602660        if ( function_exists( 'apply_filters' ) ) { 
    26612661                $function = apply_filters( 'wp_die_handler', '_default_wp_die_handler'); 
    26622662        }else { 
    2663             if(defined('DOING_AJAX') && DOING_AJAX) 
    2664                 $function = '_ajax_wp_die_handler';             
    2665             else 
    26662663                $function = '_default_wp_die_handler'; 
    26672664        }         
     2665 
    26682666        call_user_func( $function, $message, $title, $args ); 
    26692667} 
    2670 function _ajax_die_handler_filter() {  
    2671     return '_ajax_wp_die_handler';  
    2672 } 
    2673 /** 
    2674  * Kill WordPress execution and send AJAX response with error message. 
    2675  * 
    2676  * This is AJAX-version of the default handler for wp_die 
    2677  * 
    2678  * @since 3.0.0 
    2679  * @access private 
    2680  * 
    2681  * @param string $message Error message. 
    2682  * @param string $title Error title. 
    2683  * @param string|array $args Optional arguements to control behaviour. 
    2684  */ 
    2685 function _ajax_wp_die_handler( $message, $title = '', $args = array() ) { 
    26862668 
    2687         $defaults = array( 'response' => 500 ); 
    2688         $r = wp_parse_args($args, $defaults); 
    2689         $have_gettext = function_exists('__');           
    2690         $resp   =   new WP_Ajax_Response( array( 
    2691                         'what' => 'autosave', 
    2692                         'id' => $message                         
    2693                 ) ); 
    2694         $resp->send(); 
    2695         die(); 
    2696 } 
    2697  
    26982669/** 
    26992670 * Kill WordPress execution and display HTML message with error message. 
    27002671 *