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