/** * Remove the admin menus and disable profile access for non-verified users * * @since 2.4.4 * @return void */ function edd_maybe_remove_menu_profile_links() { if (current_user_can('manage_shop_settings')) { return; } if (edd_user_pending_verification()) { if (defined('IS_PROFILE_PAGE') && true === IS_PROFILE_PAGE) { $url = esc_url(edd_get_user_verification_request_url()); $message = sprintf(__('Your account is pending verification. Please click the link in your email to activate your account. No email? <a href="%s">Click here</a> to send a new activation code.', 'edd'), $url); $title = __('Account Pending Verification', 'edd'); $args = array('response' => 403); wp_die($message, $title, $args); } remove_menu_page('profile.php'); remove_submenu_page('users.php', 'profile.php'); } }
<?php if (!empty($_GET['edd-verify-request'])) { ?> <p class="edd-account-pending edd_success"> <?php _e('An email with an activation link has been sent.', 'edd'); ?> </p> <?php } ?> <p class="edd-account-pending"> <?php $url = esc_url(edd_get_user_verification_request_url()); ?> <?php printf(__('Your account is pending verification. Please click the link in your email to activate your account. No email? <a href="%s">Click here</a> to send a new activation code.', 'edd'), $url); ?> </p>