Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_all_category_ids [ WordPress Function ]

get_all_category_ids ( No parameters )
Links:
Returns:
  • (object) List of all of the category IDs.
Defined at:



Retrieves all category IDs.

Source


<?php
function get_all_category_ids() {
    if ( ! 
$cat_ids wp_cache_get'all_category_ids''category' ) ) {
        
$cat_ids get_terms'category', array('fields' => 'ids''get' => 'all') );
        
wp_cache_add'all_category_ids'$cat_ids'category' );
    }

    return 
$cat_ids;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics