PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.6
JetFormBuilder — Dynamic Blocks Form Builder v3.6.6
3.6.6.1 3.6.6 3.6.5.4 3.6.5.3 3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 134 releases
jetformbuilder / modules / verification / events / verification-failed / executor.php

executor.php in JetFormBuilder — Dynamic Blocks Form Builder 3.6.6, at modules/verification/events/verification-failed/executor.php

41 lines 835 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace JFB_Modules\Verification\Events\Verification_Failed;
5
6 // If this file is called directly, abort.
7 if ( ! defined( 'WPINC' ) ) {
8 die;
9 }
10
11 use Jet_Form_Builder\Actions\Events\Base_Executor;
12 use Jet_Form_Builder\Actions\Types\Base;
13 use JFB_Modules\Verification\Actions\Verification;
14
15 class Executor extends Base_Executor {
16
17 public function is_supported(): bool {
18 return true;
19 }
20
21 public function before_execute() {
22 parent::before_execute();
23
24 $verification = jet_fb_action_handler()->get_action( Verification::class );
25
26 if ( ! is_a( $verification, Verification::class ) ) {
27 return;
28 }
29
30 $failed_page = absint( $verification->settings['failed_page'] ?? 0 );
31 $url = get_permalink( $failed_page );
32
33 if ( ! $url ) {
34 return;
35 }
36
37 jet_fb_action_handler()->response_data['redirect'] = $url;
38 }
39
40 }
41