Changeset 34997 for trunk/src/wp-includes/category-functions.php
- Timestamp:
- 10/10/2015 01:58:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-functions.php
r34419 r34997 320 320 * 321 321 * @since 2.3.0 322 * @since 4.4.0 The `$category` parameter now also accepts a WP_Term object. 322 323 * @access private 323 324 * 324 * @param array|object $category Category Row object or array325 * @param array|object|WP_Term $category Category Row object or array 325 326 */ 326 327 function _make_cat_compat( &$category ) { 327 328 if ( is_object( $category ) && ! is_wp_error( $category ) ) { 328 $category->cat_ID = &$category->term_id;329 $category->category_count = &$category->count;330 $category->category_description = &$category->description;331 $category->cat_name = &$category->name;332 $category->category_nicename = &$category->slug;333 $category->category_parent = &$category->parent;329 $category->cat_ID = $category->term_id; 330 $category->category_count = $category->count; 331 $category->category_description = $category->description; 332 $category->cat_name = $category->name; 333 $category->category_nicename = $category->slug; 334 $category->category_parent = $category->parent; 334 335 } elseif ( is_array( $category ) && isset( $category['term_id'] ) ) { 335 336 $category['cat_ID'] = &$category['term_id'];
Note: See TracChangeset
for help on using the changeset viewer.