Make WordPress Core

Ticket #10886: 10886.5.diff

File 10886.5.diff, 850 bytes (added by DrewAPicture, 9 years ago)

Fixed docs

  • src/wp-includes/functions.php

     
    924924 */
    925925function wp( $query_vars = '' ) {
    926926        global $wp, $wp_query, $wp_the_query;
    927         $wp->main( $query_vars );
     927       
     928        /**
     929         * Filter whether to set up the WordPress environment variables.
     930         *
     931         * @since 4.4.0
     932         *
     933         * @param bool         $set_up     If a truthy value is pass, WordPress will set up the environment variables.
     934         * @param string|array $query_vars Array or string of default WP_Query arguments.
     935         */
     936        if ( apply_filters( 'run_wp_main', true, $query_vars ) ) {
     937                $wp->main( $query_vars );
     938        }
    928939
    929         if ( !isset($wp_the_query) )
     940        if ( ! isset( $wp_the_query ) ) {
    930941                $wp_the_query = $wp_query;
     942        }
    931943}
    932944
    933945/**