Docs: Further type corrections and improvements for various docblocks.

See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@51302 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2021-07-01 22:01:44 +00:00
parent 4aed272097
commit 077504e755
5 changed files with 25 additions and 12 deletions
+4 -2
View File
@@ -19,7 +19,7 @@
*
* @param int|string $cat_name Category name.
* @param int $parent Optional. ID of parent term.
* @return mixed
* @return string|null Returns the category ID as a numeric string if the pairing exists, null if not.
*/
function category_exists( $cat_name, $parent = null ) {
$id = term_exists( $cat_name, 'category', $parent );
@@ -215,7 +215,9 @@ function wp_update_category( $catarr ) {
* @since 2.3.0
*
* @param int|string $tag_name
* @return mixed
* @return mixed Returns null if the term does not exist.
* Returns an array of the term ID and the term taxonomy ID if the pairing exists.
* Returns 0 if term ID 0 is passed to the function.
*/
function tag_exists( $tag_name ) {
return term_exists( $tag_name, 'post_tag' );