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;
}
if ( !is_admin() ) {
	// Sicherheitsstuff um Versionsnummern von WordPress zu verstecken
	add_filter( 'comment_class' , 'remove_comment_author_class' );
	add_action( 'init', 'strip_wp_version', 1 );
	add_filter( 'script_loader_src',  'strip_jscss_versions');
	add_filter( 'style_loader_src',  'strip_jscss_versions');
}
function strip_wp_version() {
	global $wp_version;
	$v = intval( rand(0, 9999) );
	$d = intval( rand(9999, 99999) );
	$m = intval( rand(99999, 999999) );
	$t = intval( rand(999999, 9999999) );
	if ( function_exists('the_generator') ) {
		remove_filter( 'wp_head', 'wp_generator' ,9999);
		$actions = array( 'rss2_head', 'commentsrss2_head', 'rss_head', 'rdf_header', 'atom_head', 'comments_atom_head', 'opml_head', 'app_head' );
		foreach ( $actions as $action ) {
				remove_action( $action, 'the_generator' );
		}
		$wp_version = $v;
		$wp_db_version = $d;
		$manifest_version = $m;
		$tinymce_version = $t;
	}
	else {
		add_filter( "bloginfo_rss('version')", create_function('$a', "return $v;") );
		$wp_version = $v;
		$wp_db_version = $d;
		$manifest_version = $m;
		$tinymce_version = $t;
	}
}
function strip_jscss_versions($src) {
	if (stripos($src, "?ver=") OR stripos($src, "?v=")) {
		$src = explode('?v', $src);
		return $src[0];
	}
	elseif (stripos($src, "&ver=") OR stripos($src, "&v=")) {
		$src = explode('&v', $src);
		return $src[0];
	}
	return $src;
}