wpseek.com
WordPress开发者和主题制作者的搜索引擎



new_user_email_admin_notice › WordPress Function

Since3.0.0
已弃用n/a
new_user_email_admin_notice ( 没有参数 )
定义在:
文档:
Change Log:
  • 4.9.0

Adds an admin notice alerting the user to check for confirmation request email after email address change.



源码

function new_user_email_admin_notice() {
	global $pagenow;

	if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) ) {
		$email = get_user_meta( get_current_user_id(), '_new_email', true );
		if ( $email ) {
			$message = sprintf(
				/* translators: %s: New email address. */
				__( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ),
				'<code>' . esc_html( $email['newemail'] ) . '</code>'
			);
			wp_admin_notice( $message, array( 'type' => 'info' ) );
		}
	}
}