/* Allow Other WordPress Roles to View Email Logs * * Original doc: https://wpmailsmtp.com/docs/allowing-other-wordpress-roles-to-view-or-manage-email-logs/ */ add_filter( ‘wp_mail_smtp_pro_emails_logs_logs_get_manage_capability’, function (){ // Change this to any other capability of your choosing. return ‘manage_options’; });Continue reading
/* Allow Other WordPress Roles to View Email Logs * * Original doc: https://wpmailsmtp.com/docs/allowing-other-wordpress-roles-to-view-or-manage-email-logs/ */ add_filter( ‘wp_mail_smtp_admin_area_get_logs_access_capability’, function (){ // Change this to any other capability of your choosing. return ‘manage_options’; });Continue reading
add_action( ‘init’, function() { if ( ! current_user_can( ‘manage_options’ ) && ! is_admin() && ! is_login() ) { wp_die( ‘This website is currently undergoing scheduled maintenance. Please try again later.’ ); } } );Continue reading
add_filter( ‘wp_handle_upload’, function ( $file ) { $max_width = 1920; $max_height = 1920; // Check if the file is an image. $mime_type = mime_content_type( $file[‘file’] ); if ( strpos( $mime_type, ‘image’ ) === false ) { return $file; } //…Continue reading
// Disable the Plugin and Theme Editor if ( ! defined( ‘DISALLOW_FILE_EDIT’ ) ) { define( ‘DISALLOW_FILE_EDIT’, true ); }Continue reading
add_action( ‘admin_init’, function() { if ( ! current_user_can( ‘administrator’ ) ) { wp_redirect( home_url() ); exit; } } );Continue reading
add_filter( ‘sanitize_file_name’, ‘mb_strtolower’ );Continue reading
// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed. // This will output © 2023 or the current year automatically. echo “© ” . date( ‘Y’…Continue reading
add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://wpcode.com/wp-admin/images/wordpress-logo.svg’; $logo_width = 84; $logo_height = 84; printf( ‘ ‘, $custom_logo, $logo_width, $logo_height );…Continue reading
/* Disable WordPress Admin Bar for all users */ add_filter( ‘show_admin_bar’, ‘__return_false’ );Continue reading