populate from/reply_to for signup confirmation
- added loading screen to reinstall process
This commit is contained in:
@ -82,28 +82,24 @@ class Populator {
|
||||
private function createDefaultSettings() {
|
||||
$current_user = wp_get_current_user();
|
||||
|
||||
// user name
|
||||
$user_name = '';
|
||||
if($current_user->user_firstname) {
|
||||
$user_name = $current_user->user_firstname;
|
||||
}
|
||||
if($current_user->user_lastname) {
|
||||
if($user_name) {
|
||||
$user_name .= ' '.$current_user->user_lastname;
|
||||
}
|
||||
}
|
||||
if(!$user_name) {
|
||||
$user_name = $current_user->display_name;
|
||||
}
|
||||
// default sender info based on current user
|
||||
$sender = array(
|
||||
'name' => $current_user->display_name,
|
||||
'address' => $current_user->user_email
|
||||
);
|
||||
|
||||
// default from name & address
|
||||
Setting::setValue('sender', array(
|
||||
'name' => $user_name,
|
||||
'address' => $current_user->user_email
|
||||
));
|
||||
Setting::setValue('sender', $sender);
|
||||
|
||||
// enable signup confirmation by default
|
||||
Setting::setValue('signup_confirmation.enabled', true);
|
||||
Setting::setValue('signup_confirmation', array(
|
||||
'enabled' => true,
|
||||
'from' => array(
|
||||
'name' => get_option('blogname'),
|
||||
'address' => get_option('admin_email')
|
||||
),
|
||||
'reply_to' => $sender
|
||||
));
|
||||
}
|
||||
|
||||
private function createDefaultSegments() {
|
||||
|
@ -41,7 +41,7 @@ class Setting extends Model {
|
||||
'signup_confirmation' => array(
|
||||
'enabled' => true,
|
||||
'subject' => sprintf(__('Confirm your subscription to %1$s'), get_option('blogname')),
|
||||
'body' => __("Hello!\n\nHurray! You've subscribed to our site.\nWe need you to activate your subscription to the list(s): [lists_to_confirm] by clicking the link below: \n\n[activation_link]Click here to confirm your subscription.[/activation_link]\n\nThank you,\n\nThe team!")
|
||||
'body' => __("Hello!\n\nHurray! You've subscribed to our site.\n\nWe need you to activate your subscription to the list(s): [lists_to_confirm] by clicking the link below: \n\n[activation_link]Click here to confirm your subscription.[/activation_link]\n\nThank you,\n\nThe team!")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -190,6 +190,7 @@
|
||||
if(confirm(
|
||||
"<%= __('If you confirm this, all your current MailPoet data will be erased (newsletters, statistics, subscribers, etc...)') %>"
|
||||
)) {
|
||||
MailPoet.Modal.loading(true);
|
||||
MailPoet.Ajax.post({
|
||||
'endpoint': 'setup',
|
||||
'action': 'reset'
|
||||
|
Reference in New Issue
Block a user