Make WordPress Core

Ticket #21200: 21200.patch

File 21200.patch, 1.6 KB (added by winterDev, 12 years ago)

Hi guys-- here's a patch file, would appreciate if someone could skim it quickly to make sure I did it correctly.

  • wp-includes/category.php

     
    66 */
    77
    88/**
    9  * Retrieves all category IDs.
    10  *
    11  * @since 2.0.0
    12  * @link http://codex.wordpress.org/Function_Reference/get_all_category_ids
    13  *
    14  * @return object List of all of the category IDs.
    15  */
    16 function get_all_category_ids() {
    17         if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
    18                 $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
    19                 wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
    20         }
    21 
    22         return $cat_ids;
    23 }
    24 
    25 /**
    269 * Retrieve list of category objects.
    2710 *
    2811 * If you change the type to 'link' in the arguments, then the link categories
  • wp-includes/deprecated.php

     
    1313 */
    1414
    1515/**
     16 * Retrieves all category IDs.
     17 *
     18 * @since 2.0.0
     19 * @deprecated 3.5.0
     20 * @deprecated Use get_terms()
     21 * @link http://codex.wordpress.org/Function_Reference/get_all_category_ids
     22 *
     23 * @return object List of all of the category IDs.
     24 */
     25function get_all_category_ids() {
     26        if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
     27                $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
     28                wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
     29        }
     30
     31        return $cat_ids;
     32}
     33
     34/**
    1635 * Entire Post data.
    1736 *
    1837 * @since 0.71