mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Rather than adding a taxonomy arg to get_category(), convert all uses of get_category() in core to get_term(). By doing so, we negate the need to call _make_cat_compat() in a few places that are only looking for a single property.
Fixes #8722. git-svn-id: https://develop.svn.wordpress.org/trunk@25662 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -34,7 +34,8 @@ function category_exists($cat_name, $parent = 0) {
|
||||
* @return unknown
|
||||
*/
|
||||
function get_category_to_edit( $id ) {
|
||||
$category = get_category( $id, OBJECT, 'edit' );
|
||||
$category = get_term( $id, 'category', OBJECT, 'edit' );
|
||||
_make_cat_compat( $category );
|
||||
return $category;
|
||||
}
|
||||
|
||||
@@ -155,7 +156,8 @@ function wp_update_category($catarr) {
|
||||
return false;
|
||||
|
||||
// First, get all of the original fields
|
||||
$category = get_category($cat_ID, ARRAY_A);
|
||||
$category = get_term( $cat_ID, 'category', ARRAY_A );
|
||||
_make_cat_compat( $category );
|
||||
|
||||
// Escape data pulled from DB.
|
||||
$category = wp_slash($category);
|
||||
|
||||
Reference in New Issue
Block a user