Remove welcome page

The welcome page will be replaced by a new welcome wizard

[MAILPOET-1439]
This commit is contained in:
Rostislav Wolny
2018-08-01 13:21:18 +02:00
committed by pavel-mailpoet
parent 9369e7883c
commit a8c7615013
3 changed files with 0 additions and 158 deletions

View File

@ -278,19 +278,6 @@ class Menu {
)
);
// Welcome page
add_submenu_page(
true,
$this->setPageTitle(__('Welcome', 'mailpoet')),
__('Welcome', 'mailpoet'),
AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
'mailpoet-welcome',
array(
$this,
'welcome'
)
);
// Update page
add_submenu_page(
true,
@ -323,33 +310,6 @@ class Menu {
remove_action('admin_print_styles', 'print_emoji_styles');
}
function welcome() {
if((bool)(defined('DOING_AJAX') && DOING_AJAX)) return;
global $wp;
$current_url = home_url(add_query_arg($wp->query_string, $wp->request));
$redirect_url =
(!empty($_GET['mailpoet_redirect']))
? urldecode($_GET['mailpoet_redirect'])
: wp_get_referer();
if(
$redirect_url === $current_url
or
strpos($redirect_url, 'mailpoet') === false
) {
$redirect_url = admin_url('admin.php?page=' . self::MAIN_PAGE_SLUG);
}
$data = array(
'settings' => Setting::getAll(),
'current_user' => wp_get_current_user(),
'redirect_url' => $redirect_url,
'sub_menu' => self::MAIN_PAGE_SLUG
);
$this->displayPage('welcome.html', $data);
}
function migration() {
$mp2_migrator = new MP2Migrator($this->access_control);
$mp2_migrator->init();