wpseek.com
A WordPress-centric search engine for devs and theme authors



default_password_nag › WordPress Function

Since2.8.0
Deprecatedn/a
default_password_nag ( No parameters )
Defined at:
Codex:

No description yet.



Source

function default_password_nag() {
	global $pagenow;

	// Short-circuit it.
	if ( 'profile.php' === $pagenow || ! get_user_option( 'default_password_nag' ) ) {
		return;
	}

	$default_password_nag_message  = sprintf(
		'<p><strong>%1$s</strong> %2$s</p>',
		__( 'Notice:' ),
		__( 'You are using the auto-generated password for your account. Would you like to change it?' )
	);
	$default_password_nag_message .= sprintf(
		'<p><a href="%1$s">%2$s</a> | ',
		esc_url( get_edit_profile_url() . '#password' ),
		__( 'Yes, take me to my profile page' )
	);
	$default_password_nag_message .= sprintf(
		'<a href="%1$s" id="default-password-nag-no">%2$s</a></p>',
		'?default_password_nag=0',
		__( 'No thanks, do not remind me again' )
	);

	wp_admin_notice(
		$default_password_nag_message,
		array(
			'additional_classes' => array( 'error', 'default-password-nag' ),
			'paragraph_wrap'     => false,
		)
	);
}