Make WordPress Core

Ticket #5633: category.phpdoc.diff

File category.phpdoc.diff, 2.0 KB (added by darkdragon, 16 years ago)

incomplete documentation

  • category.php

     
    11<?php
     2/**
     3 *
     4 *
     5 * @package WordPress
     6 */
    27
    38function get_all_category_ids() {
    49        if ( ! $cat_ids = wp_cache_get('all_category_ids', 'category') ) {
     
    2429        return $categories;
    2530}
    2631
    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 */
    2945function &get_category($category, $output = OBJECT, $filter = 'raw') {
    3046        $category = get_term($category, 'category', $output, $filter);
    3147        if ( is_wp_error( $category ) )
     
    8197        return $category;
    8298}
    8399
    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 */
    85110function get_cat_ID($cat_name='General') {
    86111        $cat = get_term_by('name', $cat_name, 'category');
    87112        if ($cat)
     
    89114        return 0;
    90115}
    91116
    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 */
    93127function get_catname($cat_ID) {
    94128        return get_cat_name($cat_ID);
    95129}
    96130
    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 */
    98141function get_cat_name($cat_id) {
    99142        $cat_id = (int) $cat_id;
    100143        $category = &get_category($cat_id);