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

See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@49066 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
SergeyBiryukov 2020-09-28 11:10:01 +00:00
parent 0432229195
commit b6f5a94631

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 );