Skip to content

Commit 467083e

Browse files
committed
Added activation redirect 🎬
1 parent 819ff24 commit 467083e

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

assets/admin/css/admin-styles.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ button {
266266
margin: 20px 40px 0 20px;
267267
}
268268

269+
#mtbody-content a:focus {
270+
box-shadow: 0 0 0 1px #562dd4, 0 0 2px 1px rgba(86, 30, 190, 0.8);
271+
outline: 1px solid transparent;
272+
}
273+
269274
#mtbody-content .mighty-underline {
270275
background-image: linear-gradient(135deg, rgb(102, 126, 234) 0%, rgb(118, 75, 162) 100%);
271276
background-repeat: no-repeat;
@@ -673,7 +678,6 @@ button {
673678

674679
.coming-soon .mt-illustration {
675680
width: 600px;
676-
height: 600px;
677681
display: flex;
678682
}
679683

@@ -685,7 +689,7 @@ button {
685689
}
686690

687691
.coming-soon .under-construction {
688-
width: 100%
692+
max-width: 100%
689693
}
690694

691695
.coming-soon .cs-cta {

mighty-addons.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,15 @@ final class Mighty_Addons {
6262
*/
6363
public function __construct() {
6464

65+
register_activation_hook( __FILE__, array( $this, 'mighty_addons_activation_redirect' ) );
66+
6567
// Load translation
6668
add_action( 'init', array( $this, 'i18n' ) );
6769

6870
// Init Plugin
6971
add_action( 'plugins_loaded', array( $this, 'init' ) );
72+
73+
add_action( 'admin_init', array( $this, 'show_user_what_we_got' ) );
7074
}
7175

7276
/**
@@ -82,6 +86,34 @@ public function i18n() {
8286
load_plugin_textdomain( 'mighty' );
8387
}
8488

89+
90+
/**
91+
* Activate Mighty Addons.
92+
*
93+
* Set Mighty-Addons activation hook.
94+
*
95+
* Fired by `register_activation_hook` when the plugin is activated.
96+
*
97+
* @since 2.0.0
98+
* @access public
99+
*/
100+
public function mighty_addons_activation_redirect() {
101+
add_option('activate_mighty_addons', true);
102+
}
103+
104+
public function show_user_what_we_got() {
105+
106+
if ( get_option('activate_mighty_addons', false) ) {
107+
108+
delete_option('activate_mighty_addons');
109+
if(!isset($_GET['activate-multi']))
110+
{
111+
wp_safe_redirect( admin_url( 'admin.php?page=mighty-addons-home' ) );
112+
}
113+
}
114+
115+
}
116+
85117
/**
86118
* Initialize the plugin
87119
*

0 commit comments

Comments
 (0)