PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.1.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.1.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/admin/class-admin-welcome.php +63 -63 1.6.81.1.1 View file →
@@ -1,63 +1,63 @@
1 -<?php
2 -
3 -/**
4 - * The welcome class after install
5 - *
6 - * @since 1.1.0
7 - */
8 -class WeForms_Admin_Welcome {
9 -
10 - public function __construct() {
11 - add_action( 'admin_menu', [ $this, 'register_menu' ] );
12 - add_action( 'admin_head', [ $this, 'hide_menu' ] );
13 - add_action( 'admin_init', [ $this, 'redirect_to_page' ], 9999 );
14 - }
15 -
16 - /**
17 - * Register the admin menu to setup the welcome message
18 - *
19 - * @return void
20 - */
21 - public function register_menu() {
22 - add_dashboard_page( __( 'Welcome to weForms', 'weforms' ), __( 'Welcome to weForms', 'weforms' ), 'manage_options', 'weforms-welcome', [ $this, 'welcome_page' ] );
23 - }
24 -
25 - /**
26 - * Hide the menu as we don't want to show the welcome page in admin menu
27 - *
28 - * @return void
29 - */
30 - public function hide_menu() {
31 - remove_submenu_page( 'index.php', 'weforms-welcome' );
32 - }
33 -
34 - /**
35 - * Redirect to the welcome page once the plugin is installed
36 - *
37 - * @return void
38 - */
39 - public function redirect_to_page() {
40 - if ( !get_transient( 'weforms_activation_redirect' ) ) {
41 - return;
42 - }
43 -
44 - delete_transient( 'weforms_activation_redirect' );
45 -
46 - // Only do this for single site installs.
47 - if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
48 - return;
49 - }
50 -
51 - wp_safe_redirect( admin_url( 'index.php?page=weforms-welcome' ) );
52 - exit;
53 - }
54 -
55 - /**
56 - * Render the welcome page
57 - *
58 - * @return void
59 - */
60 - public function welcome_page() {
61 - echo 'Hello There!';
62 - }
63 -}
1 +<?php
2 +
3 +/**
4 + * The welcome class after install
5 + *
6 + * @since 1.1.0
7 + */
8 +class WeForms_Admin_Welcome {
9 +
10 + function __construct() {
11 + add_action( 'admin_menu', array( $this, 'register_menu' ) );
12 + add_action( 'admin_head', array( $this, 'hide_menu' ) );
13 + add_action( 'admin_init', array( $this, 'redirect_to_page' ), 9999 );
14 + }
15 +
16 + /**
17 + * Register the admin menu to setup the welcome message
18 + *
19 + * @return void
20 + */
21 + public function register_menu() {
22 + add_dashboard_page( __( 'Welcome to weForms', 'weforms' ), __( 'Welcome to weForms', 'weforms' ), 'manage_options', 'weforms-welcome', array( $this, 'welcome_page' ) );
23 + }
24 +
25 + /**
26 + * Hide the menu as we don't want to show the welcome page in admin menu
27 + *
28 + * @return void
29 + */
30 + public function hide_menu() {
31 + remove_submenu_page( 'index.php', 'weforms-welcome' );
32 + }
33 +
34 + /**
35 + * Redirect to the welcome page once the plugin is installed
36 + *
37 + * @return void
38 + */
39 + public function redirect_to_page() {
40 + if ( ! get_transient( 'weforms_activation_redirect' ) ) {
41 + return;
42 + }
43 +
44 + delete_transient( 'weforms_activation_redirect' );
45 +
46 + // Only do this for single site installs.
47 + if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
48 + return;
49 + }
50 +
51 + wp_safe_redirect( admin_url( 'index.php?page=weforms-welcome' ) );
52 + exit;
53 + }
54 +
55 + /**
56 + * Render the welcome page
57 + *
58 + * @return void
59 + */
60 + public function welcome_page() {
61 + echo "Hello There!";
62 + }
63 +}