This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Create Admin User | |
*/ | |
$wp_password = 'PASSWORD'; #enter your desired password here, if you don't line 16 makes sure nothing bad happens like setting you actual password to 'PASSWORD' | |
$wp_username = 'new-admin'; | |
$wp_email = 'email@domain.com'; | |
if ( $wp_password === 'PASSWORD' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Redirect users to custom URL based on their role after login and restore the cart | |
* | |
* @param string $redirect | |
* @param object $user | |
* @return string | |
*/ | |
function wp_custom_user_redirect( $redirect, $user ) { | |
// Get the first of all the roles assigned to the user |
NewerOlder