PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.5.6.2
JetFormBuilder — Dynamic Blocks Form Builder v3.5.6.2
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 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / admin / pages / action-pages-manager.php
jetformbuilder / includes / admin / pages Last commit date
actions 2 years ago interfaces 2 years ago settings 2 years ago action-pages-manager.php 2 years ago addons-page.php 2 years ago base-page.php 2 years ago pages-manager.php 1 year ago single-pages-manager.php 2 years ago stable-pages-manager.php 1 year ago
action-pages-manager.php
74 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Admin\Pages;
5
6 use Jet_Form_Builder\Admin\Exceptions\Not_Found_Page_Exception;
7 use Jet_Form_Builder\Classes\Tools;
8 use Jet_Form_Builder\Exceptions\Repository_Exception;
9 use JFB_Components\Admin\Page\Interfaces\Action_Page_It;
10 use JFB_Components\Repository\Repository_Pattern_Trait;
11
12 // If this file is called directly, abort.
13 if ( ! defined( 'WPINC' ) ) {
14 die;
15 }
16
17 class Action_Pages_Manager {
18
19 use Repository_Pattern_Trait;
20
21 public function __construct() {
22 add_action(
23 'admin_action_jfb',
24 array( $this, 'do_action' )
25 );
26 }
27
28 public function rep_instances(): array {
29 return apply_filters(
30 'jet-form-builder/admin/action-pages',
31 array()
32 );
33 }
34
35 /**
36 * @param $item
37 *
38 * @throws Repository_Exception
39 */
40 public function rep_before_install_item( $item ) {
41 if ( $item instanceof Action_Page_It ) {
42 return;
43 }
44 $this->_rep_abort_this();
45 }
46
47 public function do_action() {
48 $slug = Tools::sanitize_get_param( 'slug' );
49
50 try {
51 /** @var Action_Page_It $page */
52 $page = $this->rep_get_item( $slug );
53 } catch ( Repository_Exception $exception ) {
54 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
55 wp_die( $exception->getMessage() );
56 }
57
58 if ( ! $page->check_permission() ) {
59 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
60 wp_die( __( 'You do not have access to view this page', 'jet-form-builder' ) );
61 }
62
63 Pages_Manager::instance()->set_current_page_raw( $page );
64
65 try {
66 $page->render_page();
67 } catch ( Not_Found_Page_Exception $exception ) {
68 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
69 wp_die( $exception->getMessage() );
70 }
71 }
72
73 }
74