mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Docs: Update description for get_categories()
to avoid suggesting the deprecated type
argument.
Follow-up to [13754]. Props dingo_d. Fixes #48913. Built from https://develop.svn.wordpress.org/trunk@46891 git-svn-id: http://core.svn.wordpress.org/trunk@46691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
db18e7d50b
commit
99f11a6af2
@ -9,9 +9,8 @@
|
|||||||
/**
|
/**
|
||||||
* Retrieve list of category objects.
|
* Retrieve list of category objects.
|
||||||
*
|
*
|
||||||
* If you change the type to 'link' in the arguments, then the link categories
|
* If you set the 'taxonomy' argument to 'link_category', the link categories
|
||||||
* will be returned instead. Also all categories will be updated to be backward
|
* will be returned instead.
|
||||||
* compatible with pre-2.3 plugins and themes.
|
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @see get_terms() Type of arguments that can be changed.
|
* @see get_terms() Type of arguments that can be changed.
|
||||||
@ -19,9 +18,9 @@
|
|||||||
* @param string|array $args {
|
* @param string|array $args {
|
||||||
* Optional. Arguments to retrieve categories. See get_terms() for additional options.
|
* Optional. Arguments to retrieve categories. See get_terms() for additional options.
|
||||||
*
|
*
|
||||||
* @type string $taxonomy Taxonomy to retrieve terms for. In this case, default 'category'.
|
* @type string $taxonomy Taxonomy to retrieve terms for. Default 'category'.
|
||||||
* }
|
* }
|
||||||
* @return array List of categories.
|
* @return array List of category objects.
|
||||||
*/
|
*/
|
||||||
function get_categories( $args = '' ) {
|
function get_categories( $args = '' ) {
|
||||||
$defaults = array( 'taxonomy' => 'category' );
|
$defaults = array( 'taxonomy' => 'category' );
|
||||||
@ -78,8 +77,6 @@ function get_categories( $args = '' ) {
|
|||||||
* If you look at get_term(), then both types will be passed through several
|
* If you look at get_term(), then both types will be passed through several
|
||||||
* filters and finally sanitized based on the $filter parameter value.
|
* filters and finally sanitized based on the $filter parameter value.
|
||||||
*
|
*
|
||||||
* The category will converted to maintain backward compatibility.
|
|
||||||
*
|
|
||||||
* @since 1.5.1
|
* @since 1.5.1
|
||||||
*
|
*
|
||||||
* @param int|object $category Category ID or Category row object
|
* @param int|object $category Category ID or Category row object
|
||||||
@ -336,7 +333,7 @@ function clean_category_cache( $id ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update category structure to old pre 2.3 from new taxonomy structure.
|
* Update category structure to old pre-2.3 from new taxonomy structure.
|
||||||
*
|
*
|
||||||
* This function was added for the taxonomy support to update the new category
|
* This function was added for the taxonomy support to update the new category
|
||||||
* structure with the old category one. This will maintain compatibility with
|
* structure with the old category one. This will maintain compatibility with
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4-alpha-46887';
|
$wp_version = '5.4-alpha-46891';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user