Disable Automatic Updates Emails

// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading

Disable Emojis

/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading

Remove Header Scripts

remove_action(‘wp_head’, ‘rsd_link’); remove_action(‘wp_head’, ‘wp_generator’); remove_action(‘wp_head’, ‘feed_links’, 2); remove_action(‘wp_head’, ‘feed_links_extra’, 3); remove_action(‘wp_head’, ‘wlwmanifest_link’); remove_action(‘wp_head’, ‘adjacent_posts_rel_link’); remove_action(‘wp_head’, ‘adjacent_posts_rel_link_wp_head’, 10, 0 ); remove_action(‘wp_head’, ‘wp_shortlink_wp_head’, 10, 0); remove_action(‘wp_head’, ‘wp_oembed_add_discovery_links’, 10); remove_action(‘wp_head’, ‘rest_output_link_wp_head’, 10); remove_action(‘template_redirect’, ‘rest_output_link_header’, 11, 0); // Disable self-pingbacks function stop_self_ping( &$links )…Continue reading

Preload Featured Image

/** * Preload attachment image, defaults to post thumbnail */ function preload_post_thumbnail() { global $post; /** Prevent preloading for specific content types or post types */ if ( ! is_singular() ) { return; } /** Adjust image size based on…Continue reading

Featured Image Fetch / Load ( post_thumbnail_html )

/*Adjust Featured Image load parameters*/ function featured_image_load($html) { if ( ( !is_single() && !is_page() ) ) { return $html; } $remove = ‘alt’; $add = ‘data-spai-eager=”1″ data-skip-lazy=”1″ loading=”eager” fetchpriority=”high” alt’; $html = str_replace($remove, $add, $html); return $html; } add_filter( ‘post_thumbnail_html’,…Continue reading

Content Non-Attachment Non-Featured Image Load Attributes ( wp_content_img_tag )

add_filter( ‘wp_content_img_tag’, ‘non_featured_image_load’, 10, 3 ); function non_featured_image_load( $img_html, $context, $attachment_id ) { if ( false !== strpos( $img_html, ‘fetch-high’ ) ) { $remove = ‘alt’; $add = ‘data-skip-lazy=”1″ loading=”eager” fetchpriority=”high” alt’; $img_html = str_replace($remove, $add, $img_html); //$img_html = str_replace(…Continue reading

Disable EMOJIS

/** * Disable the emoji’s */ function disable_emojis() { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ ); add_filter( ‘tiny_mce_plugins’,…Continue reading