Tips on Customizing Email Log

How to Hide Email Log Admin Menus

function plt_hide_email_log_menus() {
	//Hide "Email Log".
	//Hide "Email Log → View Logs".
	remove_submenu_page('email-log', 'email-log');
	//Hide "Email Log → Settings".
	remove_submenu_page('email-log', 'email-log-settings');
	//Hide "Email Log → Add-ons".
	remove_submenu_page('email-log', 'email-log-addons');
	//Hide "Email Log → System Info".
	remove_submenu_page('email-log', 'email-log-system-info');

add_action('admin_menu', 'plt_hide_email_log_menus', 11);

Where do I put this code?

How to Hide the "Email Logs Summary" Dashboard Widget

function plt_hide_email_log_dashboard_widgets() {
	$screen = get_current_screen();
	if ( !$screen ) {

	//Remove the "Email Logs Summary" widget.
	remove_meta_box('email_log_dashboard_widget', 'dashboard', 'normal');

add_action('wp_dashboard_setup', 'plt_hide_email_log_dashboard_widgets', 20);