]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/taxonomy.php
WordPress 4.1.1
[autoinstalls/wordpress.git] / wp-admin / includes / taxonomy.php
index a4fa571b55ea409d84d7d1ad27ebce3078a4a5f6..c8c03848eca995135b7452a5cf59bdab9768f204 100644 (file)
 //
 
 /**
- * {@internal Missing Short Description}}
+ * Check whether a category exists.
  *
  * @since 2.0.0
  *
- * @param int|string $cat_name
- * @return int
+ * @see term_exists()
+ *
+ * @param int|string $cat_name Category name.
+ * @param int        $parent   Optional. ID of parent term.
+ * @return mixed
  */
-function category_exists($cat_name, $parent = 0) {
+function category_exists( $cat_name, $parent = null ) {
        $id = term_exists($cat_name, 'category', $parent);
        if ( is_array($id) )
                $id = $id['term_id'];