Make WordPress Core


Ignore:
Timestamp:
03/01/2012 09:35:15 PM (14 years ago)
Author:
nacin
Message:

New wp_die_app_handler context in wp_die() for APP requests. Introduces _scalar_wp_die_handler() as a generic handler that wraps die(), for use by plugins. Move deprecated function to the end of the wp-app.php file (same as xmlrpc.php). see #20042.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-atom-server.php

    r20062 r20063  
    176176                        'DELETE' => 'delete_attachment'),
    177177        );
    178 
    179         add_filter( 'wp_die_handler', array( $this, 'return_atom_die_handler' ) );
    180     }
    181 
    182     /**
    183      * Override die handler
    184      * @return callback
    185      */
    186     public function return_atom_die_handler() {
    187         return array( $this, 'atom_die_handler' );
    188     }
    189 
    190     /**
    191      * Die with a message.  Only accept strings, no WP_Error objects yet
    192      * @param string $message
    193      * @return void
    194      */
    195     public function atom_die_handler( $message ) {
    196         if ( is_scalar( $message ) )
    197             die( (string) $message );
    198         die();
    199178    }
    200179
Note: See TracChangeset for help on using the changeset viewer.