PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/controllers/FrmWelcomeController.php +3 -22 6.45.0 View file →
@@ -13,11 +13,9 @@
13 13
14 14 /**
15 15 * Register all of the hooks related to the welcome screen functionality
16 16 *
17 - * @access public
18 - *
19 - * @return void
17 + * @access public
20 18 */
21 19 public static function load_hooks() {
22 20 add_action( 'admin_init', __CLASS__ . '::redirect' );
23 21
@@ -43,9 +41,9 @@
43 41 return;
44 42 }
45 43
46 44 // Only do this for single site installs.
47 - if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
45 + if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // WPCS: CSRF ok.
48 46 return;
49 47 }
50 48
51 49 // Check if we should consider redirection.
@@ -66,10 +64,8 @@
66 64 }
67 65
68 66 /**
69 67 * Don't redirect every time the plugin is activated.
70 - *
71 - * @return bool
72 68 */
73 69 private static function already_redirected() {
74 70 $last_redirect = get_option( self::$last_redirect );
75 71 if ( $last_redirect ) {
@@ -85,11 +81,8 @@
85 81 *
86 82 * @return void
87 83 */
88 84 public static function screen_page() {
89 - if ( ! current_user_can( 'activate_plugins' ) ) {
90 - return;
91 - }
92 85 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Welcome Screen', 'formidable' ), __( 'Welcome Screen', 'formidable' ), 'read', self::$menu_slug, __CLASS__ . '::screen_content' );
93 86 }
94 87
95 88 /**
@@ -140,15 +133,12 @@
140 133 public static function settings_link() {
141 134 return admin_url( 'admin.php?page=' . self::$menu_slug );
142 135 }
143 136
144 - /**
145 - * @return void
146 - */
147 137 public static function upgrade_to_pro_button() {
148 138 if ( ! FrmAppHelper::pro_is_installed() ) {
149 139 ?>
150 - <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'welcome' ) ); ?>" class="button-secondary frm-button-secondary frm-button-sm" target="_blank" rel="nofollow noopener">
140 + <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'settings-license' ) ); ?>" class="button-secondary frm-button-secondary" target="_blank" rel="nofollow noopener">
151 141 <?php esc_html_e( 'Upgrade Now', 'formidable' ); ?>
152 142 </a>
153 143 <?php
154 144 }
@@ -153,11 +143,8 @@
153 143 <?php
154 144 }
155 145 }
156 146
157 - /**
158 - * @return void
159 - */
160 147 public static function maybe_show_license_box() {
161 148 if ( ! FrmAppHelper::pro_is_installed() ) {
162 149 FrmSettingsController::license_box();
163 150 }
@@ -162,14 +149,8 @@
162 149 FrmSettingsController::license_box();
163 150 }
164 151 }
165 152
166 - /**
167 - * @param string $plugin
168 - * @param string $upgrade_link_args
169 - *
170 - * @return void
171 - */
172 153 public static function maybe_show_conditional_action_button( $plugin, $upgrade_link_args ) {
173 154 $is_installed = is_callable( 'FrmProAppHelper::views_is_installed' ) && FrmProAppHelper::views_is_installed();
174 155 if ( ! $is_installed ) {
175 156 FrmAddonsController::conditional_action_button( $plugin, $upgrade_link_args );