Mit dem folgenden Code, werden alle Bilder auf Lazy Load bei WordPress umgestellt.

add_filter( 'wp_get_attachment_image_attributes', 'alter_att_attributes_wpse_102079', 20);
function alter_att_attributes_wpse_102079($attr) {
	if (strpos($attr['class'], 'skip-lazy') === false) {
		$attr['data-original'] = $attr['src'];
		unset($attr['src']);
		if (isset($attr['srcset'])) {
			$attr['data-original-set'] = $attr['srcset'];
			unset($attr['srcset']);
		}
		$attr['class'] .= ' lazy';
	}
	return $attr;
}
function debug_hook2() { echo "<p>--- Hook ---</p>";}
function debug_hook($hook) {
	global $wp_filter, $debughook;
	$debughook = $hook;
	$arr = array();
	foreach ($wp_filter[$hook]->callbacks as $nr => $ho) {
		$arr[$nr] = key($ho);
	}
	add_action($hook, 'debug_hook2',1);
	foreach ($arr as $nr => $ho) {
		add_action($hook, 'debug_hook2',$nr+1);
	}

	$out = "<pre>".print_r($arr,true)."</pre>";
	return $out;
}
echo debug_hook('woocommerce_email_order_details');
add_filter( 'wp_mail_from', function() { return 'example@example.com'; } );
add_filter( 'wp_mail_from_name', function() { return 'Example'; } );	

Schriften werden anschliessend nicht mehr von gfonts geladen.

add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );
add_action('wp_enqueue_scripts', 'google_fonts_local');
function google_fonts_local() {
	wp_register_style('google_fonts_local', plugins_url('fonts/stylesheet.css',__FILE__ ));
	wp_enqueue_style('google_fonts_local');
}

Schriften müssen danach weiterhin lokal über das CSS geladen werden und muss manuell eingebaut werden!

add_filter( 'site_status_tests', 'sitehealthcheck' );
function sitehealthcheck( $tests ) {
	unset($test);
	return $tests;
}
if (!wp_next_scheduled('rev_cleanup')) {
	wp_schedule_event( time(), 'daily', 'rev_cleanup' );
}
add_action( 'rev_cleanup', 'do_rev_cleanup', 10);
function do_rev_cleanup() {
    global $wpdb;
	$abfrage = "DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)  WHERE a.post_type = 'revision' AND a.post_date < '".date("Y-m-d",strtotime('-2 weeks'))."';";
	$wpdb->get_results($abfrage);
}
add_filter('admin_email_check_interval', '__return_false');
remove_action( 'add_option_new_admin_email', 'update_option_new_admin_email' );
remove_action( 'update_option_new_admin_email', 'update_option_new_admin_email' );
function wuk_update_option_new_admin_email( $old_value, $value ) { update_option( 'admin_email', $value ); }
add_action( 'add_option_new_admin_email', 'wuk_update_option_new_admin_email', 10, 2 );
add_action( 'update_option_new_admin_email', 'wuk_update_option_new_admin_email', 10, 2 );

Code muss in wp-config.php eingefügt werden:

define('WP_DISABLE_FATAL_ERROR_HANDLER', true);
add_action( 'wp_enqueue_scripts', 'add_theme_scripts',80);
function add_theme_scripts() {
	wp_register_script('demo-js','https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
	wp_enqueue_script('demo-js');

}
add_filter( 'script_loader_tag', 'add_demo_to_script', 90, 3 );
function add_demo_to_script( $tag, $handle, $source ) {
    if ( 'demo-js' === $handle ) {
        $tag = '<script data-ad-client="ca-pub-9175988955138834" async src="' . $source . '"></script>';
    }
    return $tag;
}
add_filter('upload_mimes', 'cc_mime_types');
function cc_mime_types($mimes) {
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
}