Cannot get rid of ‘The new address will not become active until confirmed’ after admin email change
Cannot get rid of ‘The new address will not become active until confirmed’ after admin email change
Cannot get rid of ‘The new address will not become active until confirmed’ after admin email change
You can update this through the database (wp_options) table. The option_name is called “admin_email”
the plugin Site Kit by Google plays with the capabilities to do that. you can see that in the source code here. this works actually with WordPress 6.8.1 but it’s not sure this trick will work with next versions. to use the same trick in your code, you have to change the 2 parameters with … Read more
How to make “page template” admin column sortable?
display two things in one admin panel column list
How to add custom post status to popover in WordPress > 6.4
How to order a Custom Fields in admin panel
If you look at the user-edit.php file, you can see, when updating an user, if there are no errors, then WP performs an redirect. This effectively wipes the admin notice you’re trying to display as it is not stored anywhere. One workaround for this is to store the custom error as a temporary option value … Read more
No need for plugin here are a few lines of code you can modify and paste in your themes functions.php file and you will get a new email whenever a post is published: add_action(‘publish_post’, ‘send_admin_email’); function send_admin_email($post_id){ $to = ‘[email protected]’; $subject=”mail subject here”; $message = “your message here ex: new post published at: “.get_permalink($post_id); wp_mail($to, … Read more
Here is a short script that prevents unapproved admins from logging in. Of course it is possible to add multiple login names. add_filter( ‘authenticate’, ‘auth_signon’, 30, 3 ); function auth_signon( $user, $username, $password ) { if( strtoupper($username) !== ‘MYLOGINNAME’ && in_array( ‘administrator’, (array) $user->roles )){ wp_logout(); return new WP_Error( ‘broke’, __( $username . “, good … Read more