File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1581,13 +1581,26 @@ function unregister_term_meta( $taxonomy, $meta_key ) {
15811581 *
15821582 * @global bool $_wp_suspend_cache_invalidation
15831583 *
1584- * @param int|string $term The term to check. Accepts term ID, slug, or name.
1585- * @param string $taxonomy Optional. The taxonomy name to use.
1586- * @param int $parent_term Optional. ID of parent term under which to confine the exists search.
1584+ * @param int|string|null $term The term to check. Accepts term ID, slug, or name.
1585+ * @param string $taxonomy Optional. The taxonomy name to use.
1586+ * @param int $parent_term Optional. ID of parent term under which to confine the exists search.
15871587 * @return mixed Returns null if the term does not exist.
15881588 * Returns the term ID if no taxonomy is specified and the term ID exists.
15891589 * Returns an array of the term ID and the term taxonomy ID if the taxonomy is specified and the pairing exists.
15901590 * Returns 0 if term ID 0 is passed to the function.
1591+ *
1592+ * @phpstan-return (
1593+ * $term is null ? null : (
1594+ * $term is 0 ? 0 : (
1595+ * $taxonomy is '' ? int|null : (
1596+ * array{
1597+ * term_id: numeric-string,
1598+ * term_taxonomy_id: numeric-string,
1599+ * }|null
1600+ * )
1601+ * )
1602+ * )
1603+ * )
15911604 */
15921605function term_exists ( $ term , $ taxonomy = '' , $ parent_term = null ) {
15931606 global $ _wp_suspend_cache_invalidation ;
You can’t perform that action at this time.
0 commit comments