Docs: Clarify the `false` return value of `get_post_type_archive_link()` and `get_post_type_archive_feed_link()`.

See #50768.
Built from https://develop.svn.wordpress.org/trunk@49066


git-svn-id: http://core.svn.wordpress.org/trunk@48828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-09-28 11:12:03 +00:00
parent 249451fe08
commit f1f579199b
2 changed files with 8 additions and 6 deletions

View File

@ -1208,7 +1208,8 @@ function get_search_comments_feed_link( $search_query = '', $feed = '' ) {
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $post_type Post type.
* @return string|false The post type archive permalink.
* @return string|false The post type archive permalink. False if the post type
* does not exist or does not have an archive.
*/
function get_post_type_archive_link( $post_type ) {
global $wp_rewrite;
@ -1263,10 +1264,11 @@ function get_post_type_archive_link( $post_type ) {
*
* @since 3.1.0
*
* @param string $post_type Post type
* @param string $post_type Post type.
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
* Default is the value of get_default_feed().
* @return string|false The post type feed permalink.
* @return string|false The post type feed permalink. False if the post type
* does not exist or does not have an archive.
*/
function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
$default_feed = get_default_feed();
@ -1353,8 +1355,8 @@ function get_preview_post_link( $post = null, $query_args = array(), $preview_li
*
* @param int|WP_Post $id Optional. Post ID or post object. Default is the global `$post`.
* @param string $context Optional. How to output the '&' character. Default '&'.
* @return string|null The edit post link for the given post. null if the post type is invalid or does
* not allow an editing UI.
* @return string|null The edit post link for the given post. Null if the post type does not exist
* or does not allow an editing UI.
*/
function get_edit_post_link( $id = 0, $context = 'display' ) {
$post = get_post( $id );

View File

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