| @@ -25,9 +25,8 @@ | ||
| 25 | 25 | * Menu, Assets and maybe redirect on plugin activation is initialized. |
| 26 | 26 | */ |
| 27 | 27 | public function __construct() { |
| 28 | 28 | add_action( 'admin_enqueue_scripts', [ $this, 'scripts' ] ); |
| 29 | - add_action( 'admin_init', [ $this, 'maybe_redirect_templately' ] ); | |
| 30 | 29 | add_action( 'admin_menu', [ $this, 'admin_menu' ] ); |
| 31 | 30 | |
| 32 | 31 | self::$cache_bank = CacheBank::get_instance(); |
| 33 | 32 | |
| @@ -249,28 +248,8 @@ | ||
| 249 | 248 | } |
| 250 | 249 | |
| 251 | 250 | public function display() { |
| 252 | 251 | Helper::views( 'settings' ); |
| 253 | - } | |
| 254 | - | |
| 255 | - /** | |
| 256 | - * Redirect on Active | |
| 257 | - */ | |
| 258 | - public function maybe_redirect_templately() { | |
| 259 | - if ( ! get_transient( 'templately_activation_redirect' ) ) { | |
| 260 | - return; | |
| 261 | - } | |
| 262 | - if ( wp_doing_ajax() ) { | |
| 263 | - return; | |
| 264 | - } | |
| 265 | - | |
| 266 | - delete_transient( 'templately_activation_redirect' ); | |
| 267 | - if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { | |
| 268 | - return; | |
| 269 | - } | |
| 270 | - // Safe Redirect to Templately Page | |
| 271 | - wp_safe_redirect( admin_url( 'admin.php?page=templately' ) ); | |
| 272 | - exit; | |
| 273 | 252 | } |
| 274 | 253 | |
| 275 | 254 | /** |
| 276 | 255 | * If Elementor doesn't exists. |