WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/05/2014 04:25:01 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Deprecate get_all_category_ids(). Suggest get_terms() as a replacement.

props winterDev, MikeHansenMe.
fixes #21200.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category.php

    r27521 r28679  
    55 * @package WordPress
    66 */
    7 
    8 /**
    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 }
    247
    258/**
Note: See TracChangeset for help on using the changeset viewer.