diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-12-05 21:53:16 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-12-05 21:53:16 +0000 |
commit | 82f78770cb8c6058bf506db617ed95c21e3c7b0a (patch) | |
tree | b33b8a3d3eb8eac9fe6f8272f62e626ea4de0623 /Postman/PostmanViewController.php | |
parent | 362ab9579ed96c1ec9b24b9c0f4097081ba3516f (diff) | |
download | Post-SMTP-82f78770cb8c6058bf506db617ed95c21e3c7b0a.zip |
* Welcome on activation
* email log records per page
* email logs trash all
* remove gmail hosts for non gmail host
Diffstat (limited to 'Postman/PostmanViewController.php')
-rw-r--r-- | Postman/PostmanViewController.php | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/Postman/PostmanViewController.php b/Postman/PostmanViewController.php index 99c3018..964e266 100644 --- a/Postman/PostmanViewController.php +++ b/Postman/PostmanViewController.php @@ -35,11 +35,34 @@ if ( ! class_exists( 'PostmanViewController' ) ) { PostmanUtils::registerAdminMenu( $this, 'addPurgeDataSubmenu' ); // initialize the scripts, stylesheets and form fields - add_action( 'admin_init', array( - $this, - 'registerStylesAndScripts', - ), 0 ); + add_action( 'admin_init', array( $this, 'registerStylesAndScripts' ), 0 ); + add_action( 'admin_init', array( $this, 'do_activation_redirect' ) ); + + } + + function do_activation_redirect() { + + // Bail if no activation redirect + if ( ! get_transient( '_post_activation_redirect' ) ) { + return; + } + + // Delete the redirect transient + // delete_transient( '_post_activation_redirect' ); + // Bail if activating from network, or bulk + if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { + return; + } + + // Bail if the current user cannot see the about page + if ( ! current_user_can( 'manage_options' ) ) { + return; + } + + // Redirect to bbPress about page + wp_safe_redirect( add_query_arg( array( 'page' => 'post-about' ), admin_url( 'index.php' ) ) ); } + public static function getPageUrl( $slug ) { return PostmanUtils::getPageUrl( $slug ); } |