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/FrmSMTPController.php +13 -40 6.265.0 View file →
@@ -43,10 +43,8 @@
43 43 /**
44 44 * Hooks.
45 45 *
46 46 * @since 4.04.04
47 - *
48 - * @return void
49 47 */
50 48 public static function load_hooks() {
51 49
52 50 add_filter( 'wp_mail_smtp_is_white_labeled', '__return_true' );
@@ -51,9 +49,8 @@
51 49
52 50 add_filter( 'wp_mail_smtp_is_white_labeled', '__return_true' );
53 51
54 52 $self = new self();
55 -
56 53 if ( wp_doing_ajax() ) {
57 54 add_action( 'wp_ajax_frm_smtp_page_check_plugin_status', array( $self, 'ajax_check_plugin_status' ) );
58 55 }
59 56
@@ -73,12 +70,8 @@
73 70 }
74 71
75 72 /**
76 73 * Customize the upgrade link.
77 - *
78 - * @param string $link
79 - *
80 - * @return string
81 74 */
82 75 public function link( $link ) {
83 76 $new_link = 'formidableforms.com/go-wp-mail-smtp/?urllink=wpmailsmtp%2Ecom%2Flite%2Dupgrade&';
84 77 $link = str_replace( 'wpmailsmtp.com/lite-upgrade/?', $new_link, $link );
@@ -88,12 +81,8 @@
88 81 /**
89 82 * Don't nag people to install WPForms
90 83 *
91 84 * @since 4.04.04
92 - *
93 - * @param array $upsell
94 - *
95 - * @return array
96 85 */
97 86 public static function remove_wpforms_nag( $upsell ) {
98 87 if ( is_array( $upsell ) ) {
99 88 foreach ( $upsell as $k => $plugin ) {
@@ -107,10 +96,8 @@
107 96 }
108 97
109 98 /**
110 99 * SMTP submenu page.
111 - *
112 - * @return void
113 100 */
114 101 public function menu() {
115 102 add_submenu_page( 'formidable', __( 'SMTP', 'formidable' ) . ' | Formidable', __( 'SMTP', 'formidable' ), 'activate_plugins', $this->slug, array( $this, 'output' ) );
116 103 }
@@ -118,10 +105,8 @@
118 105 /**
119 106 * Generate and output page HTML.
120 107 *
121 108 * @since 4.04.04
122 - *
123 - * @return void
124 109 */
125 110 public function output() {
126 111 FrmAppHelper::include_svg();
127 112 $this->css();
@@ -139,10 +124,8 @@
139 124 /**
140 125 * Generate and output heading section HTML.
141 126 *
142 127 * @since 4.04.04
143 - *
144 - * @return void
145 128 */
146 129 protected function output_section_heading() {
147 130 $size = array(
148 131 'height' => 90,
@@ -175,10 +158,8 @@
175 158 /**
176 159 * Generate and output screenshot section HTML.
177 160 *
178 161 * @since 4.04.04
179 - *
180 - * @return void
181 162 */
182 163 protected function output_section_screenshot() {
183 164
184 165 printf(
@@ -206,10 +187,8 @@
206 187 /**
207 188 * Generate and output step 'Install' section HTML.
208 189 *
209 190 * @since 4.04.04
210 - *
211 - * @return void
212 191 */
213 192 protected function output_section_step_install() {
214 193
215 194 $step = $this->get_data_step_install();
@@ -241,9 +220,9 @@
241 220 <p>%3$s</p>
242 221 <span><a rel="%4$s" class="button button-primary frm-button-primary %5$s" aria-label="%6$s">%7$s</a></span>
243 222 </div>
244 223 </section>',
245 - FrmAppHelper::kses( $icon, array( 'a', 'i', 'span', 'use', 'svg' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
224 + FrmAppHelper::kses( $icon, array( 'a', 'i', 'span', 'use', 'svg' ) ), // WPCS: XSS ok.
246 225 esc_html( $label ),
247 226 esc_html__( 'Install WP Mail SMTP from the WordPress.org plugin repository.', 'formidable' ),
248 227 esc_attr( $step['plugin'] ),
249 228 esc_attr( $step['button_class'] ),
@@ -248,9 +227,9 @@
248 227 esc_attr( $step['plugin'] ),
249 228 esc_attr( $step['button_class'] ),
250 229 esc_attr( $step['button_action'] ),
251 230 esc_html( $step['button_text'] )
252 - );
231 + ); // WPCS: XSS ok.
253 232 }
254 233
255 234 /**
256 235 * Generate and output step 'Setup' section HTML.
@@ -255,10 +234,8 @@
255 234 /**
256 235 * Generate and output step 'Setup' section HTML.
257 236 *
258 237 * @since 4.04.04
259 - *
260 - * @return void
261 238 */
262 239 protected function output_section_step_setup() {
263 240
264 241 $step = $this->get_data_step_setup();
@@ -288,15 +265,15 @@
288 265 <span><a href="%5$s" class="button button-primary frm-button-primary %6$s">%7$s</a></span>
289 266 </div>
290 267 </section>',
291 268 esc_attr( $step['section_class'] ),
292 - FrmAppHelper::kses( $icon, array( 'a', 'i', 'span', 'use', 'svg' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
269 + FrmAppHelper::kses( $icon, array( 'a', 'i', 'span', 'use', 'svg' ) ), // WPCS: XSS ok.
293 270 esc_html__( 'Set Up WP Mail SMTP', 'formidable' ),
294 271 esc_html__( 'Select and configure your mailer.', 'formidable' ),
295 272 esc_url( admin_url( $this->config['smtp_settings'] ) ),
296 273 esc_attr( $step['button_class'] ),
297 274 esc_html( $step['button_text'] )
298 - );
275 + ); // WPCS: XSS ok.
299 276 }
300 277
301 278 /**
302 279 * Step 'Install' data.
@@ -320,9 +297,8 @@
320 297 'button_action' => '',
321 298 );
322 299
323 300 $is_installed = $this->output_data['plugin_installed'] || $this->output_data['pro_plugin_installed'];
324 -
325 301 if ( ! $is_installed ) {
326 302 // Return the download url.
327 303 $step['button_text'] = __( 'Install WP Mail SMTP', 'formidable' );
328 304 $step['button_class'] = 'frm-install-addon';
@@ -336,11 +312,11 @@
336 312
337 313 $step['plugin'] = $this->output_data['pro_plugin_installed'] ? $this->config['pro_plugin'] : $this->config['lite_plugin'];
338 314
339 315 if ( $this->output_data['plugin_activated'] ) {
340 - $step['icon'] = 'frm_step_complete_icon';
341 - $step['button_text'] = __( 'WP Mail SMTP Installed & Activated', 'formidable' );
342 - $step['button_class'] = 'grey disabled';
316 + $step['icon'] = 'frm_step_complete_icon';
317 + $step['button_text'] = __( 'WP Mail SMTP Installed & Activated', 'formidable' );
318 + $step['button_class'] = 'grey disabled';
343 319 } else {
344 320 $step['button_text'] = __( 'Activate WP Mail SMTP', 'formidable' );
345 321 $step['button_class'] = 'frm-activate-addon';
346 322 $step['button_action'] = __( 'Activate', 'formidable' );
@@ -407,14 +383,15 @@
407 383 protected function is_smtp_activated() {
408 384 return function_exists( 'wp_mail_smtp' ) && ( is_plugin_active( $this->config['lite_plugin'] ) || is_plugin_active( $this->config['pro_plugin'] ) );
409 385 }
410 386
387 +
411 388 /**
412 389 * Get $phpmailer instance.
413 390 *
414 391 * @since 4.04.04
415 392 *
416 - * @return PHPMailer|\WPMailSMTP\Providers\MailCatcherInterface Instance of PHPMailer.
393 + * @return PHPMailer Instance of PHPMailer.
417 394 */
418 395 protected function get_phpmailer() {
419 396 global $phpmailer;
420 397
@@ -433,10 +410,8 @@
433 410 /**
434 411 * Redirect to SMTP settings page if it is activated..
435 412 *
436 413 * @since 4.04.04
437 - *
438 - * @return void
439 414 */
440 415 public function redirect_to_smtp_settings() {
441 416 if ( $this->is_smtp_configured() ) {
442 417 wp_safe_redirect( admin_url( $this->config['smtp_settings'] ) );
@@ -443,11 +418,8 @@
443 418 exit;
444 419 }
445 420 }
446 421
447 - /**
448 - * @return void
449 - */
450 422 private function stmp_logo() {
451 423 ?>
452 424 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" height="90" width="90"><defs><style>.cls-11,.cls-12{fill-rule:evenodd}.cls-4{fill:none}.cls-11{fill:#86a196}.cls-12{fill:#fff}</style></defs><path class="cls-4" d="M-6.3 0h60v60h-60z"/><path d="M16.7 8.1a15.4 15.4 0 00-8 10.2 23.5 23.5 0 1030 0 15.4 15.4 0 00-9.3-10.8 3.4 3.4 0 00-2.1-2.7A4.6 4.6 0 0018.4 3a24.4 24.4 0 00-1.7 5z" fill="#395360" fill-rule="evenodd"/><path fill="#fbaa6f" d="M18 26h12v14H18z"/><path d="M25.9 33.2l-.1-.1a1.4 1.4 0 111.6-2.3 1.9 1.9 0 00-1.2.8 1.9 1.9 0 00-.3 1.6zm-4.5 0a1.8 1.8 0 00-.4-1.6 2 2 0 00-1.2-.8 1.4 1.4 0 011.6 2.3zm7.2-3.2h.5l-1 4.8-2.2 6.5h-4.3l-3.2-5.4 1.1-3.2 2.1 2.7c.6.5 2.7.5 3.8-.6a26.2 26.2 0 003.2-4.8z" fill="#dc7f3c" fill-rule="evenodd"/><path d="M9.7 29H15v-9h-4a13 13 0 017.4-10q1.2-5 2.8-6.8l.1-.1.1-.1a2.3 2.3 0 011.1-.5 2.3 2.3 0 012.2 3.8 1.6 1.6 0 01-.4.3A15 15 0 0023 8a5 5 0 013-1.5 1.4 1.4 0 01.7.2 1.3 1.3 0 01.5 1.8 1.3 1.3 0 01-.6.6 13 13 0 0110.1 11l.1.8H33v8h4.8l1.8 13.4q-6.3 4-15.8 4T8 42.4zM25 38.4q3.8-6.4 3.8-7.6c0-2.2-3.2-4-4.8-4s-4.9 1.7-4.9 4q0 1.2 3.8 7.6a1.2 1.2 0 001 .6 1 1 0 001-.6z" fill="#bdcfc8" fill-rule="evenodd"/><path class="cls-4" d="M19 31h9.6L27 47.2h-6.4l-1.6-16z"/><path d="M39.8 48.8a20 20 0 01-32 0l.8-6a2.7 2.7 0 001 .1 2.8 2.8 0 002.8-2.4v1.2a2.8 2.8 0 005.6 0v1.6a2.9 2.9 0 005.7 0 2.8 2.8 0 005.7 0v-1.6a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.8 6z" fill="#809eb0" fill-rule="evenodd"/><path d="M8.3 44.6l.3-1.8a2.7 2.7 0 001 .2 2.8 2.8 0 002.8-2.5v1.2a2.8 2.8 0 005.7 0v1.7a2.9 2.9 0 005.6 0 2.8 2.8 0 005.7 0v-1.7a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.3 2a2.9 2.9 0 01-4.1-2.2v1.2a2.8 2.8 0 11-5.7 0v1.6a2.8 2.8 0 01-5.7 0 2.9 2.9 0 01-5.7 0v-1.7a2.8 2.8 0 01-5.7 0v-1.2A2.8 2.8 0 019.6 45a2.9 2.9 0 01-1.3-.3z" fill="#738e9e" fill-rule="evenodd"/><path class="cls-11" d="M37.8 22.4c-1-2.9-3-4.7-4.7-4.5-2.2.2-2.8 3.7-2.3 8s1.7 7.5 3.9 7.3 4-3.9 3.6-8c0 1.2-.5 2.3-1.3 2.4-1.2 0-1.5-1.2-1.6-2.9s-.2-3 1-3a1.5 1.5 0 011.4.7z"/><path class="cls-12" d="M37 21.8c-.6-1.3-1.5-2-2.4-1.9-1.5.1-1.9 2.6-1.6 5.5s1.2 5.1 2.7 5c1.1-.2 2-1.5 2.2-3.4a1.2 1.2 0 01-1 .6c-1 0-1.4-1.2-1.5-2.9s-.1-3 1-3a1.6 1.6 0 01.6 0z"/><path class="cls-11" d="M9.6 22.4c1-2.9 3-4.7 4.7-4.5 2.2.2 2.8 3.7 2.3 8s-1.7 7.5-3.9 7.3-4-3.9-3.7-8c.1 1.2.5 2.3 1.4 2.4 1.1 0 1.5-1.2 1.6-2.9s.1-3-1-3a1.5 1.5 0 00-1.4.7z"/><path class="cls-12" d="M10.4 21.8c.6-1.3 1.5-2 2.4-1.9 1.5.1 1.8 2.6 1.5 5.5s-1.1 5.1-2.6 5c-1.1-.2-2-1.5-2.2-3.4a1.2 1.2 0 00.9.6c1.1 0 1.4-1.2 1.6-2.9s.1-3-1-3a1.7 1.7 0 00-.7 0z"/><path d="M19 28.6a5.3 5.3 0 010-.7c0-2.4 1.2-5.2 4.9-5.2s4.8 2.8 4.8 5.2a4.4 4.4 0 010 1c-.9-1.3-2.4-2.1-4.9-2.1-2.4 0-3.9.7-4.8 1.8z" fill="#f4f8ff" fill-rule="evenodd"/><path class="cls-11" d="M26.5 9.2L23.3 9l4-1.2a1.4 1.4 0 01-.8 1.4zm-3.5-1l-1.3 1a16.8 16.8 0 002-3.8 6.6 6.6 0 00.3-2.7A2.4 2.4 0 0125.2 5a2.4 2.4 0 01-.7 1.5A15 15 0 0023 8.1z"/></svg>
453 425 <?php
@@ -452,15 +424,14 @@
452 424 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" height="90" width="90"><defs><style>.cls-11,.cls-12{fill-rule:evenodd}.cls-4{fill:none}.cls-11{fill:#86a196}.cls-12{fill:#fff}</style></defs><path class="cls-4" d="M-6.3 0h60v60h-60z"/><path d="M16.7 8.1a15.4 15.4 0 00-8 10.2 23.5 23.5 0 1030 0 15.4 15.4 0 00-9.3-10.8 3.4 3.4 0 00-2.1-2.7A4.6 4.6 0 0018.4 3a24.4 24.4 0 00-1.7 5z" fill="#395360" fill-rule="evenodd"/><path fill="#fbaa6f" d="M18 26h12v14H18z"/><path d="M25.9 33.2l-.1-.1a1.4 1.4 0 111.6-2.3 1.9 1.9 0 00-1.2.8 1.9 1.9 0 00-.3 1.6zm-4.5 0a1.8 1.8 0 00-.4-1.6 2 2 0 00-1.2-.8 1.4 1.4 0 011.6 2.3zm7.2-3.2h.5l-1 4.8-2.2 6.5h-4.3l-3.2-5.4 1.1-3.2 2.1 2.7c.6.5 2.7.5 3.8-.6a26.2 26.2 0 003.2-4.8z" fill="#dc7f3c" fill-rule="evenodd"/><path d="M9.7 29H15v-9h-4a13 13 0 017.4-10q1.2-5 2.8-6.8l.1-.1.1-.1a2.3 2.3 0 011.1-.5 2.3 2.3 0 012.2 3.8 1.6 1.6 0 01-.4.3A15 15 0 0023 8a5 5 0 013-1.5 1.4 1.4 0 01.7.2 1.3 1.3 0 01.5 1.8 1.3 1.3 0 01-.6.6 13 13 0 0110.1 11l.1.8H33v8h4.8l1.8 13.4q-6.3 4-15.8 4T8 42.4zM25 38.4q3.8-6.4 3.8-7.6c0-2.2-3.2-4-4.8-4s-4.9 1.7-4.9 4q0 1.2 3.8 7.6a1.2 1.2 0 001 .6 1 1 0 001-.6z" fill="#bdcfc8" fill-rule="evenodd"/><path class="cls-4" d="M19 31h9.6L27 47.2h-6.4l-1.6-16z"/><path d="M39.8 48.8a20 20 0 01-32 0l.8-6a2.7 2.7 0 001 .1 2.8 2.8 0 002.8-2.4v1.2a2.8 2.8 0 005.6 0v1.6a2.9 2.9 0 005.7 0 2.8 2.8 0 005.7 0v-1.6a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.8 6z" fill="#809eb0" fill-rule="evenodd"/><path d="M8.3 44.6l.3-1.8a2.7 2.7 0 001 .2 2.8 2.8 0 002.8-2.5v1.2a2.8 2.8 0 005.7 0v1.7a2.9 2.9 0 005.6 0 2.8 2.8 0 005.7 0v-1.7a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.3 2a2.9 2.9 0 01-4.1-2.2v1.2a2.8 2.8 0 11-5.7 0v1.6a2.8 2.8 0 01-5.7 0 2.9 2.9 0 01-5.7 0v-1.7a2.8 2.8 0 01-5.7 0v-1.2A2.8 2.8 0 019.6 45a2.9 2.9 0 01-1.3-.3z" fill="#738e9e" fill-rule="evenodd"/><path class="cls-11" d="M37.8 22.4c-1-2.9-3-4.7-4.7-4.5-2.2.2-2.8 3.7-2.3 8s1.7 7.5 3.9 7.3 4-3.9 3.6-8c0 1.2-.5 2.3-1.3 2.4-1.2 0-1.5-1.2-1.6-2.9s-.2-3 1-3a1.5 1.5 0 011.4.7z"/><path class="cls-12" d="M37 21.8c-.6-1.3-1.5-2-2.4-1.9-1.5.1-1.9 2.6-1.6 5.5s1.2 5.1 2.7 5c1.1-.2 2-1.5 2.2-3.4a1.2 1.2 0 01-1 .6c-1 0-1.4-1.2-1.5-2.9s-.1-3 1-3a1.6 1.6 0 01.6 0z"/><path class="cls-11" d="M9.6 22.4c1-2.9 3-4.7 4.7-4.5 2.2.2 2.8 3.7 2.3 8s-1.7 7.5-3.9 7.3-4-3.9-3.7-8c.1 1.2.5 2.3 1.4 2.4 1.1 0 1.5-1.2 1.6-2.9s.1-3-1-3a1.5 1.5 0 00-1.4.7z"/><path class="cls-12" d="M10.4 21.8c.6-1.3 1.5-2 2.4-1.9 1.5.1 1.8 2.6 1.5 5.5s-1.1 5.1-2.6 5c-1.1-.2-2-1.5-2.2-3.4a1.2 1.2 0 00.9.6c1.1 0 1.4-1.2 1.6-2.9s.1-3-1-3a1.7 1.7 0 00-.7 0z"/><path d="M19 28.6a5.3 5.3 0 010-.7c0-2.4 1.2-5.2 4.9-5.2s4.8 2.8 4.8 5.2a4.4 4.4 0 010 1c-.9-1.3-2.4-2.1-4.9-2.1-2.4 0-3.9.7-4.8 1.8z" fill="#f4f8ff" fill-rule="evenodd"/><path class="cls-11" d="M26.5 9.2L23.3 9l4-1.2a1.4 1.4 0 01-.8 1.4zm-3.5-1l-1.3 1a16.8 16.8 0 002-3.8 6.6 6.6 0 00.3-2.7A2.4 2.4 0 0125.2 5a2.4 2.4 0 01-.7 1.5A15 15 0 0023 8.1z"/></svg>
453 425 <?php
454 426 }
455 427
456 - /**
457 - * @return void
458 - */
459 428 private function css() {
460 429 ?>
461 430 <style>
462 431 #frm-admin-smtp *, #frm-admin-smtp *::before, #frm-admin-smtpp *::after {
432 + -webkit-box-sizing: border-box;
433 + -moz-box-sizing: border-box;
463 434 box-sizing: border-box;
464 435 }
465 436 #frm-admin-smtp{
466 437 width: 700px;
@@ -519,8 +490,10 @@
519 490 border-radius: 3px;
520 491 }
521 492 #frm-admin-smtp .step,
522 493 #frm-admin-smtp .screenshot .cont {
494 + -webkit-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.05);
495 + -moz-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.05);
523 496 box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.05);
524 497 }
525 498 #frm-admin-smtp .step {
526 499 background-color: #F9F9F9;