WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/11/2019 12:41:34 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for get_page_by_title().

Props atachibana.
Fixes #47860.

File:
1 edited

Legend:

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

    r45746 r45779  
    48824882 * Retrieve a page given its title.
    48834883 *
     4884 * If more than one post uses the same title, the post with the smallest ID will be returned.
     4885 * Be careful: in case of more than one post having the same title, it will check the oldest
     4886 * publication date, not the smallest ID.
     4887 *
     4888 * Because this function uses the MySQL '=' comparison, $page_title will usually be matched
     4889 * as case-insensitive with default collation.
     4890 *
    48844891 * @since 2.1.0
     4892 * @since 3.0.0 The `$post_type` parameter was added.
    48854893 *
    48864894 * @global wpdb $wpdb WordPress database abstraction object.
    48874895 *
    4888  * @param string       $page_title Page title
     4896 * @param string       $page_title Page title.
    48894897 * @param string       $output     Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
    48904898 *                                 a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
Note: See TracChangeset for help on using the changeset viewer.