@@ -11,40 +11,40 @@ |
||
11 | 11 | */ |
12 | 12 | class Transactions_Admin_Page_Init extends EE_Admin_Page_Init |
13 | 13 | { |
14 | - public function __construct() |
|
15 | - { |
|
16 | - do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
17 | - if (! defined('TXN_PG_SLUG')) { |
|
18 | - define('TXN_PG_SLUG', 'espresso_transactions'); |
|
19 | - define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG))); |
|
20 | - define('TXN_ADMIN', EE_ADMIN_PAGES . 'transactions/'); |
|
21 | - define('TXN_ADMIN_URL', admin_url('admin.php?page=' . TXN_PG_SLUG)); |
|
22 | - define('TXN_ASSETS_PATH', TXN_ADMIN . 'assets/'); |
|
23 | - define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets/')); |
|
24 | - define('TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates/'); |
|
25 | - define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates/')); |
|
26 | - } |
|
27 | - parent::__construct(); |
|
28 | - } |
|
14 | + public function __construct() |
|
15 | + { |
|
16 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
17 | + if (! defined('TXN_PG_SLUG')) { |
|
18 | + define('TXN_PG_SLUG', 'espresso_transactions'); |
|
19 | + define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG))); |
|
20 | + define('TXN_ADMIN', EE_ADMIN_PAGES . 'transactions/'); |
|
21 | + define('TXN_ADMIN_URL', admin_url('admin.php?page=' . TXN_PG_SLUG)); |
|
22 | + define('TXN_ASSETS_PATH', TXN_ADMIN . 'assets/'); |
|
23 | + define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets/')); |
|
24 | + define('TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates/'); |
|
25 | + define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates/')); |
|
26 | + } |
|
27 | + parent::__construct(); |
|
28 | + } |
|
29 | 29 | |
30 | 30 | |
31 | - protected function _set_init_properties() |
|
32 | - { |
|
33 | - $this->label = esc_html__('Transactions Overview', 'event_espresso'); |
|
34 | - } |
|
31 | + protected function _set_init_properties() |
|
32 | + { |
|
33 | + $this->label = esc_html__('Transactions Overview', 'event_espresso'); |
|
34 | + } |
|
35 | 35 | |
36 | 36 | |
37 | - public function getMenuProperties(): array |
|
38 | - { |
|
39 | - return [ |
|
40 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
41 | - 'menu_group' => 'main', |
|
42 | - 'menu_order' => 50, |
|
43 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
44 | - 'parent_slug' => 'espresso_events', |
|
45 | - 'menu_slug' => TXN_PG_SLUG, |
|
46 | - 'menu_label' => esc_html__('Transactions', 'event_espresso'), |
|
47 | - 'capability' => 'ee_read_transactions', |
|
48 | - ]; |
|
49 | - } |
|
37 | + public function getMenuProperties(): array |
|
38 | + { |
|
39 | + return [ |
|
40 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
41 | + 'menu_group' => 'main', |
|
42 | + 'menu_order' => 50, |
|
43 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
44 | + 'parent_slug' => 'espresso_events', |
|
45 | + 'menu_slug' => TXN_PG_SLUG, |
|
46 | + 'menu_label' => esc_html__('Transactions', 'event_espresso'), |
|
47 | + 'capability' => 'ee_read_transactions', |
|
48 | + ]; |
|
49 | + } |
|
50 | 50 | } |
@@ -14,15 +14,15 @@ |
||
14 | 14 | public function __construct() |
15 | 15 | { |
16 | 16 | do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
17 | - if (! defined('TXN_PG_SLUG')) { |
|
17 | + if ( ! defined('TXN_PG_SLUG')) { |
|
18 | 18 | define('TXN_PG_SLUG', 'espresso_transactions'); |
19 | 19 | define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG))); |
20 | - define('TXN_ADMIN', EE_ADMIN_PAGES . 'transactions/'); |
|
21 | - define('TXN_ADMIN_URL', admin_url('admin.php?page=' . TXN_PG_SLUG)); |
|
22 | - define('TXN_ASSETS_PATH', TXN_ADMIN . 'assets/'); |
|
23 | - define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets/')); |
|
24 | - define('TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates/'); |
|
25 | - define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates/')); |
|
20 | + define('TXN_ADMIN', EE_ADMIN_PAGES.'transactions/'); |
|
21 | + define('TXN_ADMIN_URL', admin_url('admin.php?page='.TXN_PG_SLUG)); |
|
22 | + define('TXN_ASSETS_PATH', TXN_ADMIN.'assets/'); |
|
23 | + define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/assets/')); |
|
24 | + define('TXN_TEMPLATE_PATH', TXN_ADMIN.'templates/'); |
|
25 | + define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/templates/')); |
|
26 | 26 | } |
27 | 27 | parent::__construct(); |
28 | 28 | } |
@@ -14,38 +14,38 @@ |
||
14 | 14 | */ |
15 | 15 | class Support_Admin_Page_Init extends EE_Admin_Page_Init |
16 | 16 | { |
17 | - public function __construct() |
|
18 | - { |
|
19 | - // define some help/support page related constants |
|
20 | - if (! defined('EE_SUPPORT_PG_SLUG')) { |
|
21 | - define('EE_SUPPORT_PG_SLUG', 'espresso_support'); |
|
22 | - define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG)); |
|
23 | - define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/'); |
|
24 | - define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/'); |
|
25 | - define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/'); |
|
26 | - } |
|
27 | - parent::__construct(); |
|
28 | - } |
|
17 | + public function __construct() |
|
18 | + { |
|
19 | + // define some help/support page related constants |
|
20 | + if (! defined('EE_SUPPORT_PG_SLUG')) { |
|
21 | + define('EE_SUPPORT_PG_SLUG', 'espresso_support'); |
|
22 | + define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG)); |
|
23 | + define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/'); |
|
24 | + define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/'); |
|
25 | + define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/'); |
|
26 | + } |
|
27 | + parent::__construct(); |
|
28 | + } |
|
29 | 29 | |
30 | 30 | |
31 | - protected function _set_init_properties() |
|
32 | - { |
|
33 | - $this->label = esc_html__('Help & Support', 'event_espresso'); |
|
34 | - } |
|
31 | + protected function _set_init_properties() |
|
32 | + { |
|
33 | + $this->label = esc_html__('Help & Support', 'event_espresso'); |
|
34 | + } |
|
35 | 35 | |
36 | 36 | |
37 | - public function getMenuProperties(): array |
|
38 | - { |
|
39 | - return [ |
|
40 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
41 | - 'menu_group' => 'extras', |
|
42 | - 'menu_order' => 30, |
|
43 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_AND_NETWORK, |
|
44 | - 'parent_slug' => 'espresso_events', |
|
45 | - 'menu_slug' => EE_SUPPORT_PG_SLUG, |
|
46 | - 'menu_label' => esc_html__('Help & Support', 'event_espresso'), |
|
47 | - 'capability' => 'ee_read_ee', |
|
48 | - 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
49 | - ]; |
|
50 | - } |
|
37 | + public function getMenuProperties(): array |
|
38 | + { |
|
39 | + return [ |
|
40 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
41 | + 'menu_group' => 'extras', |
|
42 | + 'menu_order' => 30, |
|
43 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_AND_NETWORK, |
|
44 | + 'parent_slug' => 'espresso_events', |
|
45 | + 'menu_slug' => EE_SUPPORT_PG_SLUG, |
|
46 | + 'menu_label' => esc_html__('Help & Support', 'event_espresso'), |
|
47 | + 'capability' => 'ee_read_ee', |
|
48 | + 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
49 | + ]; |
|
50 | + } |
|
51 | 51 | } |
@@ -17,12 +17,12 @@ |
||
17 | 17 | public function __construct() |
18 | 18 | { |
19 | 19 | // define some help/support page related constants |
20 | - if (! defined('EE_SUPPORT_PG_SLUG')) { |
|
20 | + if ( ! defined('EE_SUPPORT_PG_SLUG')) { |
|
21 | 21 | define('EE_SUPPORT_PG_SLUG', 'espresso_support'); |
22 | - define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG)); |
|
23 | - define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/'); |
|
24 | - define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/'); |
|
25 | - define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/'); |
|
22 | + define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page='.EE_SUPPORT_PG_SLUG)); |
|
23 | + define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES.'support/templates/'); |
|
24 | + define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES.'support/'); |
|
25 | + define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL.'support/assets/'); |
|
26 | 26 | } |
27 | 27 | parent::__construct(); |
28 | 28 | } |
@@ -15,39 +15,39 @@ |
||
15 | 15 | */ |
16 | 16 | class Venues_Admin_Page_Init extends EE_Admin_Page_CPT_Init |
17 | 17 | { |
18 | - public function __construct() |
|
19 | - { |
|
20 | - // define some event categories related constants |
|
21 | - if (! defined('EE_VENUES_PG_SLUG')) { |
|
22 | - define('EE_VENUES_PG_SLUG', 'espresso_venues'); |
|
23 | - define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG)); |
|
24 | - define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/'); |
|
25 | - define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/'); |
|
26 | - } |
|
27 | - parent::__construct(); |
|
28 | - $this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . '/'; |
|
29 | - } |
|
18 | + public function __construct() |
|
19 | + { |
|
20 | + // define some event categories related constants |
|
21 | + if (! defined('EE_VENUES_PG_SLUG')) { |
|
22 | + define('EE_VENUES_PG_SLUG', 'espresso_venues'); |
|
23 | + define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG)); |
|
24 | + define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/'); |
|
25 | + define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/'); |
|
26 | + } |
|
27 | + parent::__construct(); |
|
28 | + $this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . '/'; |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - protected function _set_init_properties() |
|
33 | - { |
|
34 | - $this->label = esc_html__('Event Venues', 'event_espresso'); |
|
35 | - $this->menu_label = esc_html__('Venues', 'event_espresso'); |
|
36 | - $this->menu_slug = EE_VENUES_PG_SLUG; |
|
37 | - } |
|
32 | + protected function _set_init_properties() |
|
33 | + { |
|
34 | + $this->label = esc_html__('Event Venues', 'event_espresso'); |
|
35 | + $this->menu_label = esc_html__('Venues', 'event_espresso'); |
|
36 | + $this->menu_slug = EE_VENUES_PG_SLUG; |
|
37 | + } |
|
38 | 38 | |
39 | 39 | |
40 | - public function getMenuProperties(): array |
|
41 | - { |
|
42 | - return [ |
|
43 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
44 | - 'menu_group' => 'management', |
|
45 | - 'menu_order' => 40, |
|
46 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
47 | - 'parent_slug' => 'espresso_events', |
|
48 | - 'menu_slug' => EE_VENUES_PG_SLUG, |
|
49 | - 'menu_label' => esc_html__('Venues', 'event_espresso'), |
|
50 | - 'capability' => 'ee_read_venues', |
|
51 | - ]; |
|
52 | - } |
|
40 | + public function getMenuProperties(): array |
|
41 | + { |
|
42 | + return [ |
|
43 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
44 | + 'menu_group' => 'management', |
|
45 | + 'menu_order' => 40, |
|
46 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
47 | + 'parent_slug' => 'espresso_events', |
|
48 | + 'menu_slug' => EE_VENUES_PG_SLUG, |
|
49 | + 'menu_label' => esc_html__('Venues', 'event_espresso'), |
|
50 | + 'capability' => 'ee_read_venues', |
|
51 | + ]; |
|
52 | + } |
|
53 | 53 | } |
@@ -18,14 +18,14 @@ |
||
18 | 18 | public function __construct() |
19 | 19 | { |
20 | 20 | // define some event categories related constants |
21 | - if (! defined('EE_VENUES_PG_SLUG')) { |
|
21 | + if ( ! defined('EE_VENUES_PG_SLUG')) { |
|
22 | 22 | define('EE_VENUES_PG_SLUG', 'espresso_venues'); |
23 | - define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG)); |
|
24 | - define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/'); |
|
25 | - define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/'); |
|
23 | + define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page='.EE_VENUES_PG_SLUG)); |
|
24 | + define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL.'venues/assets/'); |
|
25 | + define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES.'venues/templates/'); |
|
26 | 26 | } |
27 | 27 | parent::__construct(); |
28 | - $this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . '/'; |
|
28 | + $this->_folder_path = EE_ADMIN_PAGES.$this->_folder_name.'/'; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 |
@@ -14,39 +14,39 @@ |
||
14 | 14 | */ |
15 | 15 | class About_Admin_Page_Init extends EE_Admin_Page_Init |
16 | 16 | { |
17 | - public function __construct() |
|
18 | - { |
|
19 | - // define some events related constants |
|
20 | - if (! defined('EE_ABOUT_PG_SLUG')) { |
|
21 | - define('EE_ABOUT_PG_SLUG', 'espresso_about'); |
|
22 | - define('EE_ABOUT_LABEL', esc_html__('About', 'event_espresso')); |
|
23 | - define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES . 'about/'); |
|
24 | - define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page=' . EE_ABOUT_PG_SLUG)); |
|
25 | - define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN . 'templates/'); |
|
26 | - define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'about/assets/'); |
|
27 | - } |
|
28 | - parent::__construct(); |
|
29 | - } |
|
17 | + public function __construct() |
|
18 | + { |
|
19 | + // define some events related constants |
|
20 | + if (! defined('EE_ABOUT_PG_SLUG')) { |
|
21 | + define('EE_ABOUT_PG_SLUG', 'espresso_about'); |
|
22 | + define('EE_ABOUT_LABEL', esc_html__('About', 'event_espresso')); |
|
23 | + define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES . 'about/'); |
|
24 | + define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page=' . EE_ABOUT_PG_SLUG)); |
|
25 | + define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN . 'templates/'); |
|
26 | + define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'about/assets/'); |
|
27 | + } |
|
28 | + parent::__construct(); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - protected function _set_init_properties() |
|
33 | - { |
|
34 | - $this->label = esc_html__('About Event Espresso', 'event_espresso'); |
|
35 | - } |
|
32 | + protected function _set_init_properties() |
|
33 | + { |
|
34 | + $this->label = esc_html__('About Event Espresso', 'event_espresso'); |
|
35 | + } |
|
36 | 36 | |
37 | 37 | |
38 | - public function getMenuProperties(): array |
|
39 | - { |
|
40 | - return [ |
|
41 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
42 | - 'menu_group' => 'extras', |
|
43 | - 'menu_order' => 40, |
|
44 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_AND_NETWORK, |
|
45 | - 'parent_slug' => 'espresso_events', |
|
46 | - 'menu_slug' => 'espresso_about', |
|
47 | - 'menu_label' => EE_ABOUT_LABEL, |
|
48 | - 'capability' => 'manage_options', |
|
49 | - 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
50 | - ]; |
|
51 | - } |
|
38 | + public function getMenuProperties(): array |
|
39 | + { |
|
40 | + return [ |
|
41 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
42 | + 'menu_group' => 'extras', |
|
43 | + 'menu_order' => 40, |
|
44 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_AND_NETWORK, |
|
45 | + 'parent_slug' => 'espresso_events', |
|
46 | + 'menu_slug' => 'espresso_about', |
|
47 | + 'menu_label' => EE_ABOUT_LABEL, |
|
48 | + 'capability' => 'manage_options', |
|
49 | + 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
50 | + ]; |
|
51 | + } |
|
52 | 52 | } |
@@ -17,13 +17,13 @@ |
||
17 | 17 | public function __construct() |
18 | 18 | { |
19 | 19 | // define some events related constants |
20 | - if (! defined('EE_ABOUT_PG_SLUG')) { |
|
20 | + if ( ! defined('EE_ABOUT_PG_SLUG')) { |
|
21 | 21 | define('EE_ABOUT_PG_SLUG', 'espresso_about'); |
22 | 22 | define('EE_ABOUT_LABEL', esc_html__('About', 'event_espresso')); |
23 | - define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES . 'about/'); |
|
24 | - define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page=' . EE_ABOUT_PG_SLUG)); |
|
25 | - define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN . 'templates/'); |
|
26 | - define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'about/assets/'); |
|
23 | + define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES.'about/'); |
|
24 | + define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page='.EE_ABOUT_PG_SLUG)); |
|
25 | + define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN.'templates/'); |
|
26 | + define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL.'about/assets/'); |
|
27 | 27 | } |
28 | 28 | parent::__construct(); |
29 | 29 | } |
@@ -28,12 +28,12 @@ |
||
28 | 28 | public function __construct() |
29 | 29 | { |
30 | 30 | // define some page related constants |
31 | - if (! defined('EE_PAYMENTS_PG_SLUG')) { |
|
31 | + if ( ! defined('EE_PAYMENTS_PG_SLUG')) { |
|
32 | 32 | define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
33 | - define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page=' . EE_PAYMENTS_PG_SLUG)); |
|
34 | - define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments/'); |
|
35 | - define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates/'); |
|
36 | - define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/'); |
|
33 | + define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page='.EE_PAYMENTS_PG_SLUG)); |
|
34 | + define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES.'payments/'); |
|
35 | + define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN.'templates/'); |
|
36 | + define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL.'payments/assets/'); |
|
37 | 37 | } |
38 | 38 | $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', [], true); |
39 | 39 | // check that there are active gateways on all admin page loads. but don't do it just yet |
@@ -16,148 +16,148 @@ |
||
16 | 16 | */ |
17 | 17 | class Payments_Admin_Page_Init extends EE_Admin_Page_Init |
18 | 18 | { |
19 | - /** |
|
20 | - * @var TableAnalysis $table_analysis |
|
21 | - */ |
|
22 | - protected $_table_analysis; |
|
23 | - |
|
24 | - |
|
25 | - /** |
|
26 | - * @throws EE_Error |
|
27 | - * @throws ReflectionException |
|
28 | - */ |
|
29 | - public function __construct() |
|
30 | - { |
|
31 | - // define some page related constants |
|
32 | - if (! defined('EE_PAYMENTS_PG_SLUG')) { |
|
33 | - define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
|
34 | - define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page=' . EE_PAYMENTS_PG_SLUG)); |
|
35 | - define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments/'); |
|
36 | - define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates/'); |
|
37 | - define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/'); |
|
38 | - } |
|
39 | - $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', [], true); |
|
40 | - // check that there are active gateways on all admin page loads. but don't do it just yet |
|
41 | - add_action('admin_notices', [$this, 'check_payment_gateway_setup']); |
|
42 | - |
|
43 | - // Show/hide PP Standard alongside PP Express. |
|
44 | - add_filter( |
|
45 | - 'FHEE__Payments_Admin_Page___payment_methods_list__payment_methods', |
|
46 | - [$this, 'unset_pp_standard'] |
|
47 | - ); |
|
48 | - |
|
49 | - parent::__construct(); |
|
50 | - } |
|
51 | - |
|
52 | - |
|
53 | - protected function _set_init_properties() |
|
54 | - { |
|
55 | - $this->label = esc_html__('Payment Methods', 'event_espresso'); |
|
56 | - } |
|
57 | - |
|
58 | - |
|
59 | - public function getMenuProperties(): array |
|
60 | - { |
|
61 | - return [ |
|
62 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
63 | - 'menu_group' => 'settings', |
|
64 | - 'menu_order' => 30, |
|
65 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
66 | - 'parent_slug' => 'espresso_events', |
|
67 | - 'menu_slug' => EE_PAYMENTS_PG_SLUG, |
|
68 | - 'menu_label' => esc_html__('Payment Methods', 'event_espresso'), |
|
69 | - 'capability' => 'ee_manage_gateways', |
|
70 | - ]; |
|
71 | - } |
|
72 | - |
|
73 | - |
|
74 | - /** |
|
75 | - * Checks that there is at least one active gateway. If not, add a notice |
|
76 | - * |
|
77 | - * @throws EE_Error |
|
78 | - * @throws ReflectionException |
|
79 | - */ |
|
80 | - public function check_payment_gateway_setup() |
|
81 | - { |
|
82 | - // ONLY do this check if models can query |
|
83 | - // and avoid a bug where when we nuke EE4's data that this causes a fatal error |
|
84 | - // because the tables are deleted just before this request runs. |
|
85 | - // see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
|
86 | - if ( |
|
87 | - DbStatus::isOffline() |
|
88 | - || ! $this->_get_table_analysis()->tableExists(EEM_Payment_Method::instance()->table()) |
|
89 | - ) { |
|
90 | - return; |
|
91 | - } |
|
92 | - |
|
93 | - $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
94 | - if ($actives < 1) { |
|
95 | - $url = EE_Admin_Page::add_query_args_and_nonce([], EE_PAYMENTS_ADMIN_URL); |
|
96 | - echo '<div class="error"> |
|
19 | + /** |
|
20 | + * @var TableAnalysis $table_analysis |
|
21 | + */ |
|
22 | + protected $_table_analysis; |
|
23 | + |
|
24 | + |
|
25 | + /** |
|
26 | + * @throws EE_Error |
|
27 | + * @throws ReflectionException |
|
28 | + */ |
|
29 | + public function __construct() |
|
30 | + { |
|
31 | + // define some page related constants |
|
32 | + if (! defined('EE_PAYMENTS_PG_SLUG')) { |
|
33 | + define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
|
34 | + define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page=' . EE_PAYMENTS_PG_SLUG)); |
|
35 | + define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments/'); |
|
36 | + define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates/'); |
|
37 | + define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/'); |
|
38 | + } |
|
39 | + $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', [], true); |
|
40 | + // check that there are active gateways on all admin page loads. but don't do it just yet |
|
41 | + add_action('admin_notices', [$this, 'check_payment_gateway_setup']); |
|
42 | + |
|
43 | + // Show/hide PP Standard alongside PP Express. |
|
44 | + add_filter( |
|
45 | + 'FHEE__Payments_Admin_Page___payment_methods_list__payment_methods', |
|
46 | + [$this, 'unset_pp_standard'] |
|
47 | + ); |
|
48 | + |
|
49 | + parent::__construct(); |
|
50 | + } |
|
51 | + |
|
52 | + |
|
53 | + protected function _set_init_properties() |
|
54 | + { |
|
55 | + $this->label = esc_html__('Payment Methods', 'event_espresso'); |
|
56 | + } |
|
57 | + |
|
58 | + |
|
59 | + public function getMenuProperties(): array |
|
60 | + { |
|
61 | + return [ |
|
62 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
63 | + 'menu_group' => 'settings', |
|
64 | + 'menu_order' => 30, |
|
65 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
66 | + 'parent_slug' => 'espresso_events', |
|
67 | + 'menu_slug' => EE_PAYMENTS_PG_SLUG, |
|
68 | + 'menu_label' => esc_html__('Payment Methods', 'event_espresso'), |
|
69 | + 'capability' => 'ee_manage_gateways', |
|
70 | + ]; |
|
71 | + } |
|
72 | + |
|
73 | + |
|
74 | + /** |
|
75 | + * Checks that there is at least one active gateway. If not, add a notice |
|
76 | + * |
|
77 | + * @throws EE_Error |
|
78 | + * @throws ReflectionException |
|
79 | + */ |
|
80 | + public function check_payment_gateway_setup() |
|
81 | + { |
|
82 | + // ONLY do this check if models can query |
|
83 | + // and avoid a bug where when we nuke EE4's data that this causes a fatal error |
|
84 | + // because the tables are deleted just before this request runs. |
|
85 | + // see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
|
86 | + if ( |
|
87 | + DbStatus::isOffline() |
|
88 | + || ! $this->_get_table_analysis()->tableExists(EEM_Payment_Method::instance()->table()) |
|
89 | + ) { |
|
90 | + return; |
|
91 | + } |
|
92 | + |
|
93 | + $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
94 | + if ($actives < 1) { |
|
95 | + $url = EE_Admin_Page::add_query_args_and_nonce([], EE_PAYMENTS_ADMIN_URL); |
|
96 | + echo '<div class="error"> |
|
97 | 97 | <p>' |
98 | - . sprintf( |
|
99 | - esc_html__( |
|
100 | - "There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", |
|
101 | - "event_espresso" |
|
102 | - ), |
|
103 | - "<a href='$url'>", |
|
104 | - "</a>" |
|
105 | - ) |
|
106 | - . '</p> |
|
98 | + . sprintf( |
|
99 | + esc_html__( |
|
100 | + "There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", |
|
101 | + "event_espresso" |
|
102 | + ), |
|
103 | + "<a href='$url'>", |
|
104 | + "</a>" |
|
105 | + ) |
|
106 | + . '</p> |
|
107 | 107 | </div>'; |
108 | - } |
|
109 | - } |
|
110 | - |
|
111 | - |
|
112 | - /** |
|
113 | - * Gets the injected table analyzer, or throws an exception |
|
114 | - * |
|
115 | - * @return TableAnalysis |
|
116 | - * @throws EE_Error |
|
117 | - */ |
|
118 | - protected function _get_table_analysis() |
|
119 | - { |
|
120 | - if ($this->_table_analysis instanceof TableAnalysis) { |
|
121 | - return $this->_table_analysis; |
|
122 | - } else { |
|
123 | - throw new EE_Error( |
|
124 | - sprintf( |
|
125 | - esc_html__('Table analysis class on class %1$s is not set properly.', 'event_espresso'), |
|
126 | - get_class($this) |
|
127 | - ) |
|
128 | - ); |
|
129 | - } |
|
130 | - } |
|
131 | - |
|
132 | - |
|
133 | - /** |
|
134 | - * Hide PayPal Standard for "new" users. |
|
135 | - * |
|
136 | - * @throws EE_Error |
|
137 | - * @throws ReflectionException |
|
138 | - */ |
|
139 | - public static function unset_pp_standard($payment_method_types) |
|
140 | - { |
|
141 | - $pps = EEM_Payment_Method::instance()->get_one_of_type('Paypal_Standard'); |
|
142 | - $paypal_standard_active = ! empty($pps) && $pps->active(); |
|
143 | - $paypal_standard_active_before = false; |
|
144 | - if ($pps) { |
|
145 | - // PP Standard used before ? |
|
146 | - $paypal_id = $pps->get_extra_meta('paypal_id', true); |
|
147 | - if ($paypal_id && ! empty($paypal_id)) { |
|
148 | - $paypal_standard_active_before = true; |
|
149 | - } |
|
150 | - } |
|
151 | - |
|
152 | - // Not using PP Standard? Then display only PayPal Express, do not show PayPal Standard. |
|
153 | - if ( |
|
154 | - apply_filters( |
|
155 | - 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', |
|
156 | - ! $paypal_standard_active && ! $paypal_standard_active_before |
|
157 | - ) |
|
158 | - ) { |
|
159 | - unset($payment_method_types['paypal_standard']); |
|
160 | - } |
|
161 | - return $payment_method_types; |
|
162 | - } |
|
108 | + } |
|
109 | + } |
|
110 | + |
|
111 | + |
|
112 | + /** |
|
113 | + * Gets the injected table analyzer, or throws an exception |
|
114 | + * |
|
115 | + * @return TableAnalysis |
|
116 | + * @throws EE_Error |
|
117 | + */ |
|
118 | + protected function _get_table_analysis() |
|
119 | + { |
|
120 | + if ($this->_table_analysis instanceof TableAnalysis) { |
|
121 | + return $this->_table_analysis; |
|
122 | + } else { |
|
123 | + throw new EE_Error( |
|
124 | + sprintf( |
|
125 | + esc_html__('Table analysis class on class %1$s is not set properly.', 'event_espresso'), |
|
126 | + get_class($this) |
|
127 | + ) |
|
128 | + ); |
|
129 | + } |
|
130 | + } |
|
131 | + |
|
132 | + |
|
133 | + /** |
|
134 | + * Hide PayPal Standard for "new" users. |
|
135 | + * |
|
136 | + * @throws EE_Error |
|
137 | + * @throws ReflectionException |
|
138 | + */ |
|
139 | + public static function unset_pp_standard($payment_method_types) |
|
140 | + { |
|
141 | + $pps = EEM_Payment_Method::instance()->get_one_of_type('Paypal_Standard'); |
|
142 | + $paypal_standard_active = ! empty($pps) && $pps->active(); |
|
143 | + $paypal_standard_active_before = false; |
|
144 | + if ($pps) { |
|
145 | + // PP Standard used before ? |
|
146 | + $paypal_id = $pps->get_extra_meta('paypal_id', true); |
|
147 | + if ($paypal_id && ! empty($paypal_id)) { |
|
148 | + $paypal_standard_active_before = true; |
|
149 | + } |
|
150 | + } |
|
151 | + |
|
152 | + // Not using PP Standard? Then display only PayPal Express, do not show PayPal Standard. |
|
153 | + if ( |
|
154 | + apply_filters( |
|
155 | + 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', |
|
156 | + ! $paypal_standard_active && ! $paypal_standard_active_before |
|
157 | + ) |
|
158 | + ) { |
|
159 | + unset($payment_method_types['paypal_standard']); |
|
160 | + } |
|
161 | + return $payment_method_types; |
|
162 | + } |
|
163 | 163 | } |
@@ -17,42 +17,42 @@ |
||
17 | 17 | */ |
18 | 18 | class Registration_Form_Admin_Page_Init extends EE_Admin_Page_Init |
19 | 19 | { |
20 | - public function __construct() |
|
21 | - { |
|
22 | - // define some constants |
|
23 | - if (! defined('REGISTRATION_FORM_PG_SLUG')) { |
|
24 | - define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form'); |
|
25 | - define('REGISTRATION_FORM_LABEL', esc_html__('Registration Form', 'event_espresso')); |
|
26 | - define('REGISTRATION_FORM_PG_NAME', REGISTRATION_FORM_LABEL); |
|
27 | - define('REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES . 'registration_form/'); |
|
28 | - define('REGISTRATION_FORM_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG)); |
|
29 | - define('EE_FORMS_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG)); |
|
30 | - define('REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN . 'assets/'); |
|
31 | - define('REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registration_form/assets/'); |
|
32 | - define('REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN . 'templates/'); |
|
33 | - define('REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registration_form/templates/'); |
|
34 | - } |
|
35 | - parent::__construct(); |
|
36 | - } |
|
20 | + public function __construct() |
|
21 | + { |
|
22 | + // define some constants |
|
23 | + if (! defined('REGISTRATION_FORM_PG_SLUG')) { |
|
24 | + define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form'); |
|
25 | + define('REGISTRATION_FORM_LABEL', esc_html__('Registration Form', 'event_espresso')); |
|
26 | + define('REGISTRATION_FORM_PG_NAME', REGISTRATION_FORM_LABEL); |
|
27 | + define('REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES . 'registration_form/'); |
|
28 | + define('REGISTRATION_FORM_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG)); |
|
29 | + define('EE_FORMS_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG)); |
|
30 | + define('REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN . 'assets/'); |
|
31 | + define('REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registration_form/assets/'); |
|
32 | + define('REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN . 'templates/'); |
|
33 | + define('REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registration_form/templates/'); |
|
34 | + } |
|
35 | + parent::__construct(); |
|
36 | + } |
|
37 | 37 | |
38 | 38 | |
39 | - protected function _set_init_properties() |
|
40 | - { |
|
41 | - $this->label = esc_html__('Registration Form Overview', 'event_espresso'); |
|
42 | - } |
|
39 | + protected function _set_init_properties() |
|
40 | + { |
|
41 | + $this->label = esc_html__('Registration Form Overview', 'event_espresso'); |
|
42 | + } |
|
43 | 43 | |
44 | 44 | |
45 | - public function getMenuProperties(): array |
|
46 | - { |
|
47 | - return [ |
|
48 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
49 | - 'menu_group' => 'management', |
|
50 | - 'menu_order' => 30, |
|
51 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
52 | - 'parent_slug' => 'espresso_events', |
|
53 | - 'menu_slug' => REGISTRATION_FORM_PG_SLUG, |
|
54 | - 'menu_label' => esc_html__('Registration Form', 'event_espresso'), |
|
55 | - 'capability' => 'ee_read_questions', |
|
56 | - ]; |
|
57 | - } |
|
45 | + public function getMenuProperties(): array |
|
46 | + { |
|
47 | + return [ |
|
48 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
49 | + 'menu_group' => 'management', |
|
50 | + 'menu_order' => 30, |
|
51 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
52 | + 'parent_slug' => 'espresso_events', |
|
53 | + 'menu_slug' => REGISTRATION_FORM_PG_SLUG, |
|
54 | + 'menu_label' => esc_html__('Registration Form', 'event_espresso'), |
|
55 | + 'capability' => 'ee_read_questions', |
|
56 | + ]; |
|
57 | + } |
|
58 | 58 | } |
@@ -20,17 +20,17 @@ |
||
20 | 20 | public function __construct() |
21 | 21 | { |
22 | 22 | // define some constants |
23 | - if (! defined('REGISTRATION_FORM_PG_SLUG')) { |
|
23 | + if ( ! defined('REGISTRATION_FORM_PG_SLUG')) { |
|
24 | 24 | define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form'); |
25 | 25 | define('REGISTRATION_FORM_LABEL', esc_html__('Registration Form', 'event_espresso')); |
26 | 26 | define('REGISTRATION_FORM_PG_NAME', REGISTRATION_FORM_LABEL); |
27 | - define('REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES . 'registration_form/'); |
|
28 | - define('REGISTRATION_FORM_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG)); |
|
29 | - define('EE_FORMS_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG)); |
|
30 | - define('REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN . 'assets/'); |
|
31 | - define('REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registration_form/assets/'); |
|
32 | - define('REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN . 'templates/'); |
|
33 | - define('REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registration_form/templates/'); |
|
27 | + define('REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES.'registration_form/'); |
|
28 | + define('REGISTRATION_FORM_ADMIN_URL', admin_url('admin.php?page='.REGISTRATION_FORM_PG_SLUG)); |
|
29 | + define('EE_FORMS_ADMIN_URL', admin_url('admin.php?page='.REGISTRATION_FORM_PG_SLUG)); |
|
30 | + define('REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN.'assets/'); |
|
31 | + define('REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL.'registration_form/assets/'); |
|
32 | + define('REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN.'templates/'); |
|
33 | + define('REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'registration_form/templates/'); |
|
34 | 34 | } |
35 | 35 | parent::__construct(); |
36 | 36 | } |
@@ -14,38 +14,38 @@ |
||
14 | 14 | */ |
15 | 15 | class Other_Services_Admin_Page_Init extends EE_Admin_Page_Init |
16 | 16 | { |
17 | - public function __construct() |
|
18 | - { |
|
19 | - // define some help/support page related constants |
|
20 | - if (! defined('EE_OTHER_SERVICES_PG_SLUG')) { |
|
21 | - define('EE_OTHER_SERVICES_PG_SLUG', 'espresso_packages'); |
|
22 | - define('EE_OTHER_SERVICES_ADMIN_URL', admin_url('admin.php?page=' . EE_OTHER_SERVICES_PG_SLUG)); |
|
23 | - define('EE_OTHER_SERVICES_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'other_services/templates/'); |
|
24 | - define('EE_OTHER_SERVICES_ADMIN', EE_ADMIN_PAGES . 'other_services/'); |
|
25 | - define('EE_OTHER_SERVICES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'other_services/assets/'); |
|
26 | - } |
|
27 | - parent::__construct(); |
|
28 | - } |
|
17 | + public function __construct() |
|
18 | + { |
|
19 | + // define some help/support page related constants |
|
20 | + if (! defined('EE_OTHER_SERVICES_PG_SLUG')) { |
|
21 | + define('EE_OTHER_SERVICES_PG_SLUG', 'espresso_packages'); |
|
22 | + define('EE_OTHER_SERVICES_ADMIN_URL', admin_url('admin.php?page=' . EE_OTHER_SERVICES_PG_SLUG)); |
|
23 | + define('EE_OTHER_SERVICES_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'other_services/templates/'); |
|
24 | + define('EE_OTHER_SERVICES_ADMIN', EE_ADMIN_PAGES . 'other_services/'); |
|
25 | + define('EE_OTHER_SERVICES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'other_services/assets/'); |
|
26 | + } |
|
27 | + parent::__construct(); |
|
28 | + } |
|
29 | 29 | |
30 | 30 | |
31 | - protected function _set_init_properties() |
|
32 | - { |
|
33 | - $this->label = esc_html__('Extensions & Services', 'event_espresso'); |
|
34 | - } |
|
31 | + protected function _set_init_properties() |
|
32 | + { |
|
33 | + $this->label = esc_html__('Extensions & Services', 'event_espresso'); |
|
34 | + } |
|
35 | 35 | |
36 | 36 | |
37 | - public function getMenuProperties(): array |
|
38 | - { |
|
39 | - return [ |
|
40 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
41 | - 'menu_group' => 'extras', |
|
42 | - 'menu_order' => 30, |
|
43 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_AND_NETWORK, |
|
44 | - 'parent_slug' => 'espresso_events', |
|
45 | - 'menu_slug' => EE_OTHER_SERVICES_PG_SLUG, |
|
46 | - 'menu_label' => esc_html__('Extensions & Services', 'event_espresso'), |
|
47 | - 'capability' => 'ee_read_ee', |
|
48 | - 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
49 | - ]; |
|
50 | - } |
|
37 | + public function getMenuProperties(): array |
|
38 | + { |
|
39 | + return [ |
|
40 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
41 | + 'menu_group' => 'extras', |
|
42 | + 'menu_order' => 30, |
|
43 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_AND_NETWORK, |
|
44 | + 'parent_slug' => 'espresso_events', |
|
45 | + 'menu_slug' => EE_OTHER_SERVICES_PG_SLUG, |
|
46 | + 'menu_label' => esc_html__('Extensions & Services', 'event_espresso'), |
|
47 | + 'capability' => 'ee_read_ee', |
|
48 | + 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
49 | + ]; |
|
50 | + } |
|
51 | 51 | } |
@@ -17,12 +17,12 @@ |
||
17 | 17 | public function __construct() |
18 | 18 | { |
19 | 19 | // define some help/support page related constants |
20 | - if (! defined('EE_OTHER_SERVICES_PG_SLUG')) { |
|
20 | + if ( ! defined('EE_OTHER_SERVICES_PG_SLUG')) { |
|
21 | 21 | define('EE_OTHER_SERVICES_PG_SLUG', 'espresso_packages'); |
22 | - define('EE_OTHER_SERVICES_ADMIN_URL', admin_url('admin.php?page=' . EE_OTHER_SERVICES_PG_SLUG)); |
|
23 | - define('EE_OTHER_SERVICES_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'other_services/templates/'); |
|
24 | - define('EE_OTHER_SERVICES_ADMIN', EE_ADMIN_PAGES . 'other_services/'); |
|
25 | - define('EE_OTHER_SERVICES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'other_services/assets/'); |
|
22 | + define('EE_OTHER_SERVICES_ADMIN_URL', admin_url('admin.php?page='.EE_OTHER_SERVICES_PG_SLUG)); |
|
23 | + define('EE_OTHER_SERVICES_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES.'other_services/templates/'); |
|
24 | + define('EE_OTHER_SERVICES_ADMIN', EE_ADMIN_PAGES.'other_services/'); |
|
25 | + define('EE_OTHER_SERVICES_ASSETS_URL', EE_ADMIN_PAGES_URL.'other_services/assets/'); |
|
26 | 26 | } |
27 | 27 | parent::__construct(); |
28 | 28 | } |
@@ -17,38 +17,38 @@ |
||
17 | 17 | */ |
18 | 18 | class General_Settings_Admin_Page_Init extends EE_Admin_Page_Init |
19 | 19 | { |
20 | - public function __construct() |
|
21 | - { |
|
22 | - // define some constants |
|
23 | - if (! defined('GEN_SET_PG_SLUG')) { |
|
24 | - define('GEN_SET_PG_SLUG', 'espresso_general_settings'); |
|
25 | - define('GEN_SET_LABEL', esc_html__('General Settings', 'event_espresso')); |
|
26 | - define('GEN_SET_ADMIN', EE_ADMIN_PAGES . 'general_settings/'); |
|
27 | - define('GEN_SET_ADMIN_URL', admin_url('admin.php?page=' . GEN_SET_PG_SLUG)); |
|
28 | - define('GEN_SET_TEMPLATE_PATH', GEN_SET_ADMIN . 'templates/'); |
|
29 | - define('GEN_SET_ASSETS_URL', EE_ADMIN_PAGES_URL . 'general_settings/assets/'); |
|
30 | - } |
|
31 | - parent::__construct(); |
|
32 | - } |
|
20 | + public function __construct() |
|
21 | + { |
|
22 | + // define some constants |
|
23 | + if (! defined('GEN_SET_PG_SLUG')) { |
|
24 | + define('GEN_SET_PG_SLUG', 'espresso_general_settings'); |
|
25 | + define('GEN_SET_LABEL', esc_html__('General Settings', 'event_espresso')); |
|
26 | + define('GEN_SET_ADMIN', EE_ADMIN_PAGES . 'general_settings/'); |
|
27 | + define('GEN_SET_ADMIN_URL', admin_url('admin.php?page=' . GEN_SET_PG_SLUG)); |
|
28 | + define('GEN_SET_TEMPLATE_PATH', GEN_SET_ADMIN . 'templates/'); |
|
29 | + define('GEN_SET_ASSETS_URL', EE_ADMIN_PAGES_URL . 'general_settings/assets/'); |
|
30 | + } |
|
31 | + parent::__construct(); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | |
35 | - protected function _set_init_properties() |
|
36 | - { |
|
37 | - $this->label = GEN_SET_LABEL; |
|
38 | - } |
|
35 | + protected function _set_init_properties() |
|
36 | + { |
|
37 | + $this->label = GEN_SET_LABEL; |
|
38 | + } |
|
39 | 39 | |
40 | 40 | |
41 | - public function getMenuProperties(): array |
|
42 | - { |
|
43 | - return [ |
|
44 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
45 | - 'menu_group' => 'settings', |
|
46 | - 'menu_order' => 20, |
|
47 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
48 | - 'parent_slug' => 'espresso_events', |
|
49 | - 'menu_slug' => GEN_SET_PG_SLUG, |
|
50 | - 'menu_label' => GEN_SET_LABEL, |
|
51 | - 'capability' => 'manage_options', |
|
52 | - ]; |
|
53 | - } |
|
41 | + public function getMenuProperties(): array |
|
42 | + { |
|
43 | + return [ |
|
44 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
45 | + 'menu_group' => 'settings', |
|
46 | + 'menu_order' => 20, |
|
47 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
48 | + 'parent_slug' => 'espresso_events', |
|
49 | + 'menu_slug' => GEN_SET_PG_SLUG, |
|
50 | + 'menu_label' => GEN_SET_LABEL, |
|
51 | + 'capability' => 'manage_options', |
|
52 | + ]; |
|
53 | + } |
|
54 | 54 | } |
@@ -20,13 +20,13 @@ |
||
20 | 20 | public function __construct() |
21 | 21 | { |
22 | 22 | // define some constants |
23 | - if (! defined('GEN_SET_PG_SLUG')) { |
|
23 | + if ( ! defined('GEN_SET_PG_SLUG')) { |
|
24 | 24 | define('GEN_SET_PG_SLUG', 'espresso_general_settings'); |
25 | 25 | define('GEN_SET_LABEL', esc_html__('General Settings', 'event_espresso')); |
26 | - define('GEN_SET_ADMIN', EE_ADMIN_PAGES . 'general_settings/'); |
|
27 | - define('GEN_SET_ADMIN_URL', admin_url('admin.php?page=' . GEN_SET_PG_SLUG)); |
|
28 | - define('GEN_SET_TEMPLATE_PATH', GEN_SET_ADMIN . 'templates/'); |
|
29 | - define('GEN_SET_ASSETS_URL', EE_ADMIN_PAGES_URL . 'general_settings/assets/'); |
|
26 | + define('GEN_SET_ADMIN', EE_ADMIN_PAGES.'general_settings/'); |
|
27 | + define('GEN_SET_ADMIN_URL', admin_url('admin.php?page='.GEN_SET_PG_SLUG)); |
|
28 | + define('GEN_SET_TEMPLATE_PATH', GEN_SET_ADMIN.'templates/'); |
|
29 | + define('GEN_SET_ASSETS_URL', EE_ADMIN_PAGES_URL.'general_settings/assets/'); |
|
30 | 30 | } |
31 | 31 | parent::__construct(); |
32 | 32 | } |
@@ -14,18 +14,18 @@ |
||
14 | 14 | */ |
15 | 15 | class EspressoStandardPostTypeEditor extends RouteMatchSpecification |
16 | 16 | { |
17 | - /** |
|
18 | - * returns true if current request matches specification |
|
19 | - * |
|
20 | - * @since 4.9.71.p |
|
21 | - * @return boolean |
|
22 | - */ |
|
23 | - public function isMatchingRoute() |
|
24 | - { |
|
25 | - return $this->request->getMatch('espresso_*') !== false |
|
26 | - && ( |
|
27 | - $this->request->getRequestParam('action') === 'edit' |
|
28 | - || $this->request->getRequestParam('action') === 'create_new' |
|
29 | - ); |
|
30 | - } |
|
17 | + /** |
|
18 | + * returns true if current request matches specification |
|
19 | + * |
|
20 | + * @since 4.9.71.p |
|
21 | + * @return boolean |
|
22 | + */ |
|
23 | + public function isMatchingRoute() |
|
24 | + { |
|
25 | + return $this->request->getMatch('espresso_*') !== false |
|
26 | + && ( |
|
27 | + $this->request->getRequestParam('action') === 'edit' |
|
28 | + || $this->request->getRequestParam('action') === 'create_new' |
|
29 | + ); |
|
30 | + } |
|
31 | 31 | } |