Ticket #5633: category.phpdoc.diff
File category.phpdoc.diff, 2.0 KB (added by , 17 years ago) |
---|
-
category.php
1 1 <?php 2 /** 3 * 4 * 5 * @package WordPress 6 */ 2 7 3 8 function get_all_category_ids() { 4 9 if ( ! $cat_ids = wp_cache_get('all_category_ids', 'category') ) { … … 24 29 return $categories; 25 30 } 26 31 27 // Retrieves category data given a category ID or category object. 28 // Handles category caching. 32 /** 33 * get_category() - Retrieves category data given a category ID or category object 34 * 35 * Handles category caching. 36 * {@internal Missing Long Description}} 37 * 38 * @since 2.1.0 39 * 40 * @param unknown_type $category 41 * @param unknown_type $output 42 * @param unknown_type $filter 43 * @return unknown 44 */ 29 45 function &get_category($category, $output = OBJECT, $filter = 'raw') { 30 46 $category = get_term($category, 'category', $output, $filter); 31 47 if ( is_wp_error( $category ) ) … … 81 97 return $category; 82 98 } 83 99 84 // Get the ID of a category from its name 100 /** 101 * get_cat_ID() - Get the ID of a category from its name 102 * 103 * {@internal Missing Long Description}} 104 * 105 * @since 1.0.0 106 * 107 * @param string $cat_name 108 * @return int 109 */ 85 110 function get_cat_ID($cat_name='General') { 86 111 $cat = get_term_by('name', $cat_name, 'category'); 87 112 if ($cat) … … 89 114 return 0; 90 115 } 91 116 92 // Deprecate 117 /** 118 * get_catname() - Get the nategory name by Category ID 119 * 120 * @since 0.71 121 * @deprecated Use get_cat_name() 122 * @see get_cat_name() get_catname() is deprecated in favor of get_cat_name() 123 * 124 * @param int $cat_ID Category ID 125 * @return string category name 126 */ 93 127 function get_catname($cat_ID) { 94 128 return get_cat_name($cat_ID); 95 129 } 96 130 97 // Get the name of a category from its ID 131 /** 132 * get_cat_name() - Get the name of a category from its ID 133 * 134 * {@internal Missing Long Description}} 135 * 136 * @since 1.0.0 137 * 138 * @param int $cat_id Category ID 139 * @return string category name 140 */ 98 141 function get_cat_name($cat_id) { 99 142 $cat_id = (int) $cat_id; 100 143 $category = &get_category($cat_id);