diff --git a/src/wp-includes/category.php b/src/wp-includes/category.php
index d1c43274d704b..318cfed74028d 100644
--- a/src/wp-includes/category.php
+++ b/src/wp-includes/category.php
@@ -249,34 +249,6 @@ function cat_is_ancestor_of( $cat1, $cat2 ) {
return term_is_ancestor_of( $cat1, $cat2, 'category' );
}
-/**
- * Sanitizes category data based on context.
- *
- * @since 2.3.0
- *
- * @param object|array $category Category data.
- * @param string $context Optional. Default 'display'.
- * @return object|array Same type as $category with sanitized data for safe use.
- */
-function sanitize_category( $category, $context = 'display' ) {
- return sanitize_term( $category, 'category', $context );
-}
-
-/**
- * Sanitizes data in single category key field.
- *
- * @since 2.3.0
- *
- * @param string $field Category key to sanitize.
- * @param mixed $value Category value to sanitize.
- * @param int $cat_id Category ID.
- * @param string $context What filter to use, 'raw', 'display', etc.
- * @return mixed Value after $value has been sanitized.
- */
-function sanitize_category_field( $field, $value, $cat_id, $context ) {
- return sanitize_term_field( $field, $value, $cat_id, 'category', $context );
-}
-
/* Tags */
/**
diff --git a/src/wp-includes/class-wp-term.php b/src/wp-includes/class-wp-term.php
index f512936e03d45..5c81dde06fd05 100644
--- a/src/wp-includes/class-wp-term.php
+++ b/src/wp-includes/class-wp-term.php
@@ -181,10 +181,7 @@ public static function get_instance( $term_id, $taxonomy = null ) {
}
}
- $term_obj = new WP_Term( $_term );
- $term_obj->filter( $term_obj->filter );
-
- return $term_obj;
+ return new WP_Term( $_term );
}
/**
@@ -208,7 +205,16 @@ public function __construct( $term ) {
* @param string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'rss', or 'raw'.
*/
public function filter( $filter ) {
- sanitize_term( $this, $this->taxonomy, $filter );
+ if ( $this->filter === $filter ) {
+
+ return $this;
+ }
+ if ( 'raw' === $filter ) {
+
+ return self::get_instance( $this->term_id );
+ }
+
+ return sanitize_term( $this, $this->taxonomy, $filter );
}
/**
diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
index 360acf5d4689f..c26e6179bd9aa 100644
--- a/src/wp-includes/deprecated.php
+++ b/src/wp-includes/deprecated.php
@@ -5891,9 +5891,10 @@ function _wp_theme_json_webfonts_handler() {
function print_embed_styles() {
_deprecated_function( __FUNCTION__, '6.4.0', 'wp_enqueue_embed_styles' );
- $suffix = SCRIPT_DEBUG ? '' : '.min';
+ $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
?>
-
-
+
-