Make WordPress Core

Ticket #31723: 31723.diff

File 31723.diff, 1.5 KB (added by jipmoors, 8 years ago)

to null change on default value

  • src/wp-includes/query.php

     
    485485 * @param mixed $page Page ID, title, slug, or array of such.
    486486 * @return bool
    487487 */
    488 function is_page( $page = '' ) {
     488function is_page( $page = null ) {
    489489        global $wp_query;
    490490
    491491        if ( ! isset( $wp_query ) ) {
     
    594594 * @param mixed $post Post ID, title, slug, or array of such.
    595595 * @return bool
    596596 */
    597 function is_single( $post = '' ) {
     597function is_single( $post = null ) {
    598598        global $wp_query;
    599599
    600600        if ( ! isset( $wp_query ) ) {
     
    43594359         * @param mixed $page Page ID, title, slug, path, or array of such.
    43604360         * @return bool
    43614361         */
    4362         public function is_page( $page = '' ) {
    4363                 if ( !$this->is_page )
     4362        public function is_page( $page = null ) {
     4363                if ( ! $this->is_page )
    43644364                        return false;
    43654365
    4366                 if ( empty( $page ) )
     4366                if ( is_null($page) ) {
    43674367                        return true;
     4368                }
    43684369
     4370                if (empty( $page) )
     4371                        return false;
     4372
     4373
    43694374                $page_obj = $this->get_queried_object();
    43704375
    43714376                $page = (array) $page;
     
    44524457         * @param mixed $post Post ID, title, slug, path, or array of such.
    44534458         * @return bool
    44544459         */
    4455         public function is_single( $post = '' ) {
     4460        public function is_single( $post = null ) {
    44564461                if ( !$this->is_single )
    44574462                        return false;
    44584463
    4459                 if ( empty($post) )
     4464                if ( is_null($post) )
    44604465                        return true;
    44614466
     4467                if ( empty($post))
     4468                        return false;
     4469
    44624470                $post_obj = $this->get_queried_object();
    44634471
    44644472                $post = (array) $post;