Make WordPress Core

Changeset 38363


Ignore:
Timestamp:
08/26/2016 09:57:47 AM (8 years ago)
Author:
wonderboymusic
Message:

Load: move is_wp_error() to load.php so that WP_Error is in a file by itself.

See #37827.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-error.php

    r37487 r38363  
    203203    }
    204204}
    205 
    206 /**
    207  * Check whether variable is a WordPress Error.
    208  *
    209  * Returns true if $thing is an object of the WP_Error class.
    210  *
    211  * @since 2.1.0
    212  *
    213  * @param mixed $thing Check if unknown variable is a WP_Error object.
    214  * @return bool True, if WP_Error. False, if not WP_Error.
    215  */
    216 function is_wp_error( $thing ) {
    217     return ( $thing instanceof WP_Error );
    218 }
  • trunk/src/wp-includes/load.php

    r38334 r38363  
    10461046    return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );
    10471047}
     1048
     1049/**
     1050 * Check whether variable is a WordPress Error.
     1051 *
     1052 * Returns true if $thing is an object of the WP_Error class.
     1053 *
     1054 * @since 2.1.0
     1055 *
     1056 * @param mixed $thing Check if unknown variable is a WP_Error object.
     1057 * @return bool True, if WP_Error. False, if not WP_Error.
     1058 */
     1059function is_wp_error( $thing ) {
     1060    return ( $thing instanceof WP_Error );
     1061}
Note: See TracChangeset for help on using the changeset viewer.