registered['jquery'] ) ) { $script = $scripts->registered['jquery']; if ( ! empty( $script->deps ) ) { // Check whether the script has any dependencies $script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) ); } } } /** * Remove the tinymce emoji plugin * * @since 4.5.0 */ public function disable_emoji_for_tinymce( $plugins ) { if ( is_array( $plugins ) ) { return array_diff( $plugins, array( 'wpemoji' ) ); } return array(); } /** * Remove emoji CDN hostname from DNS prefetching hints. * * @since 4.5.0 */ public function disable_emoji_remove_dns_prefetch( $urls, $relation_type ) { if ( 'dns-prefetch' == $relation_type ) { // Strip out any URLs referencing the WordPress.org emoji location $emoji_svg_url_base = 'https://s.w.org/images/core/emoji/'; foreach ( $urls as $key => $url ) { if ( is_string( $url ) && false !== strpos( $url, $emoji_svg_url_base ) ) { unset( $urls[$key] ); } } } return $urls; } /** * Disable emojis in wp-admin * * @since 4.7.2 */ public function disable_admin_emojis() { remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'admin_print_styles', 'print_emoji_styles' ); } /** * Add loading="eager" attribute for featured images * * @link https://plugins.trac.wordpress.org/browser/disable-lazy-loading/tags/2.1/disable-lazy-loading.php * @since 7.3.0 */ public function eager_load_featured_images( $attr, $attachment = null ) { $attr['loading'] = 'eager'; return $attr; } }