Docs: Improve documentation for `get_page_by_title()`.

Props atachibana.
Fixes #47860.
Built from https://develop.svn.wordpress.org/trunk@45779


git-svn-id: http://core.svn.wordpress.org/trunk@45590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-11 12:42:56 +00:00
parent 64290005f5
commit 80d153fb70
2 changed files with 10 additions and 2 deletions

View File

@ -4881,11 +4881,19 @@ function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
/**
* Retrieve a page given its title.
*
* If more than one post uses the same title, the post with the smallest ID will be returned.
* Be careful: in case of more than one post having the same title, it will check the oldest
* publication date, not the smallest ID.
*
* Because this function uses the MySQL '=' comparison, $page_title will usually be matched
* as case-insensitive with default collation.
*
* @since 2.1.0
* @since 3.0.0 The `$post_type` parameter was added.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $page_title Page title
* @param string $page_title Page title.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
* a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
* @param string|array $post_type Optional. Post type or array of post types. Default 'page'.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45778';
$wp_version = '5.3-alpha-45779';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.