Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times

If you look at the source for the home_url() function, you’ll note a small series of function calls eventually invoking get_option(). As explained in this WPSE Answer, the get_option() function is cached, meaning that if an option’s value is already in memory, get_option() returns that value instead of querying the database again. As a result, … Read more

Send automatic mail to Admin when user/member changes/adds profile

you got the first part right about using personal_options_update but to be on the safe side add edit_user_profile_update also. and as for sending emails within WordPress the best way would be to use wp_mail, So something like this: add_action( ‘personal_options_update’, ‘notify_admin_on_update’ ); add_action( ‘edit_user_profile_update’,’notify_admin_on_update’); function notify_admin_on_update(){ global $current_user; get_currentuserinfo(); if (!current_user_can( ‘administrator’ )){// avoid sending … Read more