@@ -17,102 +17,102 @@ |
||
17 | 17 | */ |
18 | 18 | class Maintenance_Admin_Page_Init extends EE_Admin_Page_Init |
19 | 19 | { |
20 | - /** |
|
21 | - * @var int |
|
22 | - */ |
|
23 | - protected $m_mode_level; |
|
20 | + /** |
|
21 | + * @var int |
|
22 | + */ |
|
23 | + protected $m_mode_level; |
|
24 | 24 | |
25 | - /** |
|
26 | - * @var bool |
|
27 | - */ |
|
28 | - protected $is_full_m_mode; |
|
25 | + /** |
|
26 | + * @var bool |
|
27 | + */ |
|
28 | + protected $is_full_m_mode; |
|
29 | 29 | |
30 | 30 | |
31 | - public function __construct() |
|
32 | - { |
|
33 | - $this->m_mode_level = EE_Maintenance_Mode::instance()->level(); |
|
34 | - $this->is_full_m_mode = $this->m_mode_level /*=== EE_Maintenance_Mode::level_2_complete_maintenance*/; |
|
35 | - // define some page related constants |
|
36 | - if (! defined('EE_MAINTENANCE_PG_SLUG')) { |
|
37 | - define('EE_MAINTENANCE_LABEL', esc_html__('Maintenance', 'event_espresso')); |
|
38 | - define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings'); |
|
39 | - define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page=' . EE_MAINTENANCE_PG_SLUG)); |
|
40 | - define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance/'); |
|
41 | - define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates/'); |
|
42 | - define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/'); |
|
43 | - } |
|
44 | - // check that if we're in maintenance mode that we tell the admin that |
|
45 | - add_action('admin_notices', [$this, 'check_maintenance_mode']); |
|
46 | - parent::__construct(); |
|
47 | - } |
|
31 | + public function __construct() |
|
32 | + { |
|
33 | + $this->m_mode_level = EE_Maintenance_Mode::instance()->level(); |
|
34 | + $this->is_full_m_mode = $this->m_mode_level /*=== EE_Maintenance_Mode::level_2_complete_maintenance*/; |
|
35 | + // define some page related constants |
|
36 | + if (! defined('EE_MAINTENANCE_PG_SLUG')) { |
|
37 | + define('EE_MAINTENANCE_LABEL', esc_html__('Maintenance', 'event_espresso')); |
|
38 | + define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings'); |
|
39 | + define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page=' . EE_MAINTENANCE_PG_SLUG)); |
|
40 | + define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance/'); |
|
41 | + define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates/'); |
|
42 | + define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/'); |
|
43 | + } |
|
44 | + // check that if we're in maintenance mode that we tell the admin that |
|
45 | + add_action('admin_notices', [$this, 'check_maintenance_mode']); |
|
46 | + parent::__construct(); |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - protected function _set_init_properties() |
|
51 | - { |
|
52 | - $this->label = EE_MAINTENANCE_LABEL; |
|
53 | - } |
|
50 | + protected function _set_init_properties() |
|
51 | + { |
|
52 | + $this->label = EE_MAINTENANCE_LABEL; |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - public function getMenuProperties(): array |
|
57 | - { |
|
58 | - return [ |
|
59 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
60 | - 'menu_group' => $this->is_full_m_mode ? 'main' : 'extras', |
|
61 | - 'menu_order' => 30, |
|
62 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
63 | - 'parent_slug' => 'espresso_events', |
|
64 | - 'menu_slug' => EE_MAINTENANCE_PG_SLUG, |
|
65 | - 'menu_label' => EE_MAINTENANCE_LABEL, |
|
66 | - 'capability' => 'manage_options', |
|
67 | - 'maintenance_mode_parent' => EE_MAINTENANCE_PG_SLUG, |
|
68 | - ]; |
|
69 | - } |
|
56 | + public function getMenuProperties(): array |
|
57 | + { |
|
58 | + return [ |
|
59 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
60 | + 'menu_group' => $this->is_full_m_mode ? 'main' : 'extras', |
|
61 | + 'menu_order' => 30, |
|
62 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
63 | + 'parent_slug' => 'espresso_events', |
|
64 | + 'menu_slug' => EE_MAINTENANCE_PG_SLUG, |
|
65 | + 'menu_label' => EE_MAINTENANCE_LABEL, |
|
66 | + 'capability' => 'manage_options', |
|
67 | + 'maintenance_mode_parent' => EE_MAINTENANCE_PG_SLUG, |
|
68 | + ]; |
|
69 | + } |
|
70 | 70 | |
71 | 71 | |
72 | - /** |
|
73 | - * Checks if we're in maintenance mode, and if so we notify the admin adn tell them how to take the site OUT of |
|
74 | - * maintenance mode |
|
75 | - */ |
|
76 | - public function check_maintenance_mode() |
|
77 | - { |
|
78 | - $notice = ''; |
|
79 | - $maintenance_page_url = ''; |
|
80 | - if ($this->m_mode_level) { |
|
81 | - $maintenance_page_url = esc_url_raw( |
|
82 | - EE_Admin_Page::add_query_args_and_nonce([], EE_MAINTENANCE_ADMIN_URL) |
|
83 | - ); |
|
84 | - switch ($this->m_mode_level) { |
|
85 | - case EE_Maintenance_Mode::level_1_frontend_only_maintenance: |
|
86 | - $notice = '<div class="update-nag ee-update-nag">'; |
|
87 | - $notice .= sprintf( |
|
88 | - esc_html__( |
|
89 | - "Event Espresso is in Frontend-Only MAINTENANCE MODE. This means the front-end (ie, non-wp-admin pages) is disabled for ALL users except site admins. Visit the %s Maintenance Page %s to disable maintenance mode.", |
|
90 | - "event_espresso" |
|
91 | - ), |
|
92 | - "<a href='$maintenance_page_url'>", |
|
93 | - "</a>" |
|
94 | - ); |
|
95 | - $notice .= '</div>'; |
|
96 | - break; |
|
97 | - case EE_Maintenance_Mode::level_2_complete_maintenance: |
|
98 | - $notice = '<div class="error"><p>'; |
|
99 | - $notice .= sprintf( |
|
100 | - esc_html__( |
|
101 | - "As part of the process for updating Event Espresso, your database also |
|
72 | + /** |
|
73 | + * Checks if we're in maintenance mode, and if so we notify the admin adn tell them how to take the site OUT of |
|
74 | + * maintenance mode |
|
75 | + */ |
|
76 | + public function check_maintenance_mode() |
|
77 | + { |
|
78 | + $notice = ''; |
|
79 | + $maintenance_page_url = ''; |
|
80 | + if ($this->m_mode_level) { |
|
81 | + $maintenance_page_url = esc_url_raw( |
|
82 | + EE_Admin_Page::add_query_args_and_nonce([], EE_MAINTENANCE_ADMIN_URL) |
|
83 | + ); |
|
84 | + switch ($this->m_mode_level) { |
|
85 | + case EE_Maintenance_Mode::level_1_frontend_only_maintenance: |
|
86 | + $notice = '<div class="update-nag ee-update-nag">'; |
|
87 | + $notice .= sprintf( |
|
88 | + esc_html__( |
|
89 | + "Event Espresso is in Frontend-Only MAINTENANCE MODE. This means the front-end (ie, non-wp-admin pages) is disabled for ALL users except site admins. Visit the %s Maintenance Page %s to disable maintenance mode.", |
|
90 | + "event_espresso" |
|
91 | + ), |
|
92 | + "<a href='$maintenance_page_url'>", |
|
93 | + "</a>" |
|
94 | + ); |
|
95 | + $notice .= '</div>'; |
|
96 | + break; |
|
97 | + case EE_Maintenance_Mode::level_2_complete_maintenance: |
|
98 | + $notice = '<div class="error"><p>'; |
|
99 | + $notice .= sprintf( |
|
100 | + esc_html__( |
|
101 | + "As part of the process for updating Event Espresso, your database also |
|
102 | 102 | needs to be updated. Event Espresso is in COMPLETE MAINTENANCE MODE (both WordPress admin pages and front-end event registration pages are disabled) until you run the database update script. %s Visit the Maintenance Page to get started,%s it only takes a moment.", |
103 | - "event_espresso" |
|
104 | - ), |
|
105 | - "<a href='$maintenance_page_url'>", |
|
106 | - "</a>" |
|
107 | - ); |
|
108 | - $notice .= '</p></div>'; |
|
109 | - break; |
|
110 | - } |
|
111 | - } |
|
112 | - echo apply_filters( |
|
113 | - 'FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', |
|
114 | - $notice, // already escaped |
|
115 | - $maintenance_page_url // already escaped |
|
116 | - ); |
|
117 | - } |
|
103 | + "event_espresso" |
|
104 | + ), |
|
105 | + "<a href='$maintenance_page_url'>", |
|
106 | + "</a>" |
|
107 | + ); |
|
108 | + $notice .= '</p></div>'; |
|
109 | + break; |
|
110 | + } |
|
111 | + } |
|
112 | + echo apply_filters( |
|
113 | + 'FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', |
|
114 | + $notice, // already escaped |
|
115 | + $maintenance_page_url // already escaped |
|
116 | + ); |
|
117 | + } |
|
118 | 118 | } |
@@ -33,13 +33,13 @@ |
||
33 | 33 | $this->m_mode_level = EE_Maintenance_Mode::instance()->level(); |
34 | 34 | $this->is_full_m_mode = $this->m_mode_level /*=== EE_Maintenance_Mode::level_2_complete_maintenance*/; |
35 | 35 | // define some page related constants |
36 | - if (! defined('EE_MAINTENANCE_PG_SLUG')) { |
|
36 | + if ( ! defined('EE_MAINTENANCE_PG_SLUG')) { |
|
37 | 37 | define('EE_MAINTENANCE_LABEL', esc_html__('Maintenance', 'event_espresso')); |
38 | 38 | define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings'); |
39 | - define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page=' . EE_MAINTENANCE_PG_SLUG)); |
|
40 | - define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance/'); |
|
41 | - define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates/'); |
|
42 | - define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/'); |
|
39 | + define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page='.EE_MAINTENANCE_PG_SLUG)); |
|
40 | + define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES.'maintenance/'); |
|
41 | + define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN.'templates/'); |
|
42 | + define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL.'maintenance/assets/'); |
|
43 | 43 | } |
44 | 44 | // check that if we're in maintenance mode that we tell the admin that |
45 | 45 | add_action('admin_notices', [$this, 'check_maintenance_mode']); |
@@ -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 | } |
@@ -14,41 +14,41 @@ |
||
14 | 14 | */ |
15 | 15 | class Events_Admin_Page_Init extends EE_Admin_Page_CPT_Init |
16 | 16 | { |
17 | - public function __construct() |
|
18 | - { |
|
19 | - /** |
|
20 | - * define some events related constants but only if not defined (need to check because unit tests |
|
21 | - * may load) |
|
22 | - */ |
|
23 | - if (! defined('EVENTS_PG_SLUG')) { |
|
24 | - define('EVENTS_PG_SLUG', 'espresso_events'); |
|
25 | - define('EVENTS_LABEL', esc_html__('Events', 'event_espresso')); |
|
26 | - define('EVENTS_ADMIN', EE_ADMIN_PAGES . 'events/'); |
|
27 | - define('EVENTS_ADMIN_URL', admin_url('admin.php?page=' . EVENTS_PG_SLUG)); |
|
28 | - define('EVENTS_TEMPLATE_PATH', EVENTS_ADMIN . 'templates/'); |
|
29 | - define('EVENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'events/assets/'); |
|
30 | - } |
|
31 | - parent::__construct(); |
|
32 | - } |
|
17 | + public function __construct() |
|
18 | + { |
|
19 | + /** |
|
20 | + * define some events related constants but only if not defined (need to check because unit tests |
|
21 | + * may load) |
|
22 | + */ |
|
23 | + if (! defined('EVENTS_PG_SLUG')) { |
|
24 | + define('EVENTS_PG_SLUG', 'espresso_events'); |
|
25 | + define('EVENTS_LABEL', esc_html__('Events', 'event_espresso')); |
|
26 | + define('EVENTS_ADMIN', EE_ADMIN_PAGES . 'events/'); |
|
27 | + define('EVENTS_ADMIN_URL', admin_url('admin.php?page=' . EVENTS_PG_SLUG)); |
|
28 | + define('EVENTS_TEMPLATE_PATH', EVENTS_ADMIN . 'templates/'); |
|
29 | + define('EVENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'events/assets/'); |
|
30 | + } |
|
31 | + parent::__construct(); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | |
35 | - protected function _set_init_properties() |
|
36 | - { |
|
37 | - $this->label = esc_html__('Event Espresso - Event Details', 'event_espresso'); |
|
38 | - } |
|
35 | + protected function _set_init_properties() |
|
36 | + { |
|
37 | + $this->label = esc_html__('Event Espresso - Event Details', 'event_espresso'); |
|
38 | + } |
|
39 | 39 | |
40 | 40 | |
41 | - public function getMenuProperties(): array |
|
42 | - { |
|
43 | - return [ |
|
44 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
45 | - 'menu_group' => 'main', |
|
46 | - 'menu_order' => 10, |
|
47 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
48 | - 'parent_slug' => 'espresso_events', |
|
49 | - 'menu_slug' => 'espresso_events', |
|
50 | - 'menu_label' => esc_html__('Events', 'event_espresso'), |
|
51 | - 'capability' => 'ee_read_events', |
|
52 | - ]; |
|
53 | - } |
|
41 | + public function getMenuProperties(): array |
|
42 | + { |
|
43 | + return [ |
|
44 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
45 | + 'menu_group' => 'main', |
|
46 | + 'menu_order' => 10, |
|
47 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
48 | + 'parent_slug' => 'espresso_events', |
|
49 | + 'menu_slug' => 'espresso_events', |
|
50 | + 'menu_label' => esc_html__('Events', 'event_espresso'), |
|
51 | + 'capability' => 'ee_read_events', |
|
52 | + ]; |
|
53 | + } |
|
54 | 54 | } |
@@ -11,48 +11,48 @@ |
||
11 | 11 | */ |
12 | 12 | class Registrations_Admin_Page_Init extends EE_Admin_Page_CPT_Init |
13 | 13 | { |
14 | - /** |
|
15 | - * constructor |
|
16 | - * |
|
17 | - * @Constructor |
|
18 | - * @access public |
|
19 | - * @return void |
|
20 | - */ |
|
21 | - public function __construct() |
|
22 | - { |
|
23 | - do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
24 | - if (! defined('REG_PG_SLUG')) { |
|
25 | - define('REG_PG_SLUG', 'espresso_registrations'); |
|
26 | - define('REG_PG_NAME', ucwords(str_replace('_', '', REG_PG_SLUG))); |
|
27 | - define('REG_ADMIN', EE_ADMIN_PAGES . 'registrations/'); |
|
28 | - define('REG_ADMIN_URL', admin_url('admin.php?page=' . REG_PG_SLUG)); |
|
29 | - define('REG_ASSETS_PATH', REG_ADMIN . 'assets/'); |
|
30 | - define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registrations/assets/'); |
|
31 | - define('REG_TEMPLATE_PATH', REG_ADMIN . 'templates/'); |
|
32 | - define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registrations/templates/'); |
|
33 | - } |
|
14 | + /** |
|
15 | + * constructor |
|
16 | + * |
|
17 | + * @Constructor |
|
18 | + * @access public |
|
19 | + * @return void |
|
20 | + */ |
|
21 | + public function __construct() |
|
22 | + { |
|
23 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
24 | + if (! defined('REG_PG_SLUG')) { |
|
25 | + define('REG_PG_SLUG', 'espresso_registrations'); |
|
26 | + define('REG_PG_NAME', ucwords(str_replace('_', '', REG_PG_SLUG))); |
|
27 | + define('REG_ADMIN', EE_ADMIN_PAGES . 'registrations/'); |
|
28 | + define('REG_ADMIN_URL', admin_url('admin.php?page=' . REG_PG_SLUG)); |
|
29 | + define('REG_ASSETS_PATH', REG_ADMIN . 'assets/'); |
|
30 | + define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registrations/assets/'); |
|
31 | + define('REG_TEMPLATE_PATH', REG_ADMIN . 'templates/'); |
|
32 | + define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registrations/templates/'); |
|
33 | + } |
|
34 | 34 | |
35 | - parent::__construct(); |
|
36 | - } |
|
35 | + parent::__construct(); |
|
36 | + } |
|
37 | 37 | |
38 | 38 | |
39 | - protected function _set_init_properties() |
|
40 | - { |
|
41 | - $this->label = esc_html__('Registrations Overview', 'event_espresso'); |
|
42 | - } |
|
39 | + protected function _set_init_properties() |
|
40 | + { |
|
41 | + $this->label = esc_html__('Registrations 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' => 'main', |
|
50 | - 'menu_order' => 40, |
|
51 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
52 | - 'parent_slug' => 'espresso_events', |
|
53 | - 'menu_slug' => REG_PG_SLUG, |
|
54 | - 'menu_label' => esc_html__('Registrations', 'event_espresso'), |
|
55 | - 'capability' => 'ee_read_registrations', |
|
56 | - ]; |
|
57 | - } |
|
45 | + public function getMenuProperties(): array |
|
46 | + { |
|
47 | + return [ |
|
48 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
49 | + 'menu_group' => 'main', |
|
50 | + 'menu_order' => 40, |
|
51 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
52 | + 'parent_slug' => 'espresso_events', |
|
53 | + 'menu_slug' => REG_PG_SLUG, |
|
54 | + 'menu_label' => esc_html__('Registrations', 'event_espresso'), |
|
55 | + 'capability' => 'ee_read_registrations', |
|
56 | + ]; |
|
57 | + } |
|
58 | 58 | } |
@@ -15,147 +15,147 @@ |
||
15 | 15 | */ |
16 | 16 | class Payments_Admin_Page_Init extends EE_Admin_Page_Init |
17 | 17 | { |
18 | - /** |
|
19 | - * @var TableAnalysis $table_analysis |
|
20 | - */ |
|
21 | - protected $_table_analysis; |
|
22 | - |
|
23 | - |
|
24 | - /** |
|
25 | - * @throws EE_Error |
|
26 | - * @throws ReflectionException |
|
27 | - */ |
|
28 | - public function __construct() |
|
29 | - { |
|
30 | - // define some page related constants |
|
31 | - if (! defined('EE_PAYMENTS_PG_SLUG')) { |
|
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/'); |
|
37 | - } |
|
38 | - $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', [], true); |
|
39 | - // check that there are active gateways on all admin page loads. but don't do it just yet |
|
40 | - add_action('admin_notices', [$this, 'check_payment_gateway_setup']); |
|
41 | - |
|
42 | - // Show/hide PP Standard alongside PP Express. |
|
43 | - add_filter( |
|
44 | - 'FHEE__Payments_Admin_Page___payment_methods_list__payment_methods', |
|
45 | - [$this, 'unset_pp_standard'] |
|
46 | - ); |
|
47 | - |
|
48 | - parent::__construct(); |
|
49 | - } |
|
50 | - |
|
51 | - |
|
52 | - protected function _set_init_properties() |
|
53 | - { |
|
54 | - $this->label = esc_html__('Payment Methods', 'event_espresso'); |
|
55 | - } |
|
56 | - |
|
57 | - |
|
58 | - public function getMenuProperties(): array |
|
59 | - { |
|
60 | - return [ |
|
61 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
62 | - 'menu_group' => 'settings', |
|
63 | - 'menu_order' => 30, |
|
64 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
65 | - 'parent_slug' => 'espresso_events', |
|
66 | - 'menu_slug' => EE_PAYMENTS_PG_SLUG, |
|
67 | - 'menu_label' => esc_html__('Payment Methods', 'event_espresso'), |
|
68 | - 'capability' => 'ee_manage_gateways', |
|
69 | - ]; |
|
70 | - } |
|
71 | - |
|
72 | - |
|
73 | - /** |
|
74 | - * Checks that there is at least one active gateway. If not, add a notice |
|
75 | - * |
|
76 | - * @throws EE_Error |
|
77 | - */ |
|
78 | - public function check_payment_gateway_setup() |
|
79 | - { |
|
80 | - // ONLY do this check if models can query |
|
81 | - // and avoid a bug where when we nuke EE4's data that this causes a fatal error |
|
82 | - // because the tables are deleted just before this request runs. |
|
83 | - // see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
|
84 | - if ( |
|
85 | - ! EE_Maintenance_Mode::instance()->models_can_query() |
|
86 | - || ! $this->_get_table_analysis()->tableExists(EEM_Payment_Method::instance()->table()) |
|
87 | - ) { |
|
88 | - return; |
|
89 | - } |
|
90 | - |
|
91 | - $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
92 | - if ($actives < 1) { |
|
93 | - $url = EE_Admin_Page::add_query_args_and_nonce([], EE_PAYMENTS_ADMIN_URL); |
|
94 | - echo '<div class="error"> |
|
18 | + /** |
|
19 | + * @var TableAnalysis $table_analysis |
|
20 | + */ |
|
21 | + protected $_table_analysis; |
|
22 | + |
|
23 | + |
|
24 | + /** |
|
25 | + * @throws EE_Error |
|
26 | + * @throws ReflectionException |
|
27 | + */ |
|
28 | + public function __construct() |
|
29 | + { |
|
30 | + // define some page related constants |
|
31 | + if (! defined('EE_PAYMENTS_PG_SLUG')) { |
|
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/'); |
|
37 | + } |
|
38 | + $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', [], true); |
|
39 | + // check that there are active gateways on all admin page loads. but don't do it just yet |
|
40 | + add_action('admin_notices', [$this, 'check_payment_gateway_setup']); |
|
41 | + |
|
42 | + // Show/hide PP Standard alongside PP Express. |
|
43 | + add_filter( |
|
44 | + 'FHEE__Payments_Admin_Page___payment_methods_list__payment_methods', |
|
45 | + [$this, 'unset_pp_standard'] |
|
46 | + ); |
|
47 | + |
|
48 | + parent::__construct(); |
|
49 | + } |
|
50 | + |
|
51 | + |
|
52 | + protected function _set_init_properties() |
|
53 | + { |
|
54 | + $this->label = esc_html__('Payment Methods', 'event_espresso'); |
|
55 | + } |
|
56 | + |
|
57 | + |
|
58 | + public function getMenuProperties(): array |
|
59 | + { |
|
60 | + return [ |
|
61 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
62 | + 'menu_group' => 'settings', |
|
63 | + 'menu_order' => 30, |
|
64 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
65 | + 'parent_slug' => 'espresso_events', |
|
66 | + 'menu_slug' => EE_PAYMENTS_PG_SLUG, |
|
67 | + 'menu_label' => esc_html__('Payment Methods', 'event_espresso'), |
|
68 | + 'capability' => 'ee_manage_gateways', |
|
69 | + ]; |
|
70 | + } |
|
71 | + |
|
72 | + |
|
73 | + /** |
|
74 | + * Checks that there is at least one active gateway. If not, add a notice |
|
75 | + * |
|
76 | + * @throws EE_Error |
|
77 | + */ |
|
78 | + public function check_payment_gateway_setup() |
|
79 | + { |
|
80 | + // ONLY do this check if models can query |
|
81 | + // and avoid a bug where when we nuke EE4's data that this causes a fatal error |
|
82 | + // because the tables are deleted just before this request runs. |
|
83 | + // see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
|
84 | + if ( |
|
85 | + ! EE_Maintenance_Mode::instance()->models_can_query() |
|
86 | + || ! $this->_get_table_analysis()->tableExists(EEM_Payment_Method::instance()->table()) |
|
87 | + ) { |
|
88 | + return; |
|
89 | + } |
|
90 | + |
|
91 | + $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
92 | + if ($actives < 1) { |
|
93 | + $url = EE_Admin_Page::add_query_args_and_nonce([], EE_PAYMENTS_ADMIN_URL); |
|
94 | + echo '<div class="error"> |
|
95 | 95 | <p>' |
96 | - . sprintf( |
|
97 | - esc_html__( |
|
98 | - "There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", |
|
99 | - "event_espresso" |
|
100 | - ), |
|
101 | - "<a href='$url'>", |
|
102 | - "</a>" |
|
103 | - ) |
|
104 | - . '</p> |
|
96 | + . sprintf( |
|
97 | + esc_html__( |
|
98 | + "There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", |
|
99 | + "event_espresso" |
|
100 | + ), |
|
101 | + "<a href='$url'>", |
|
102 | + "</a>" |
|
103 | + ) |
|
104 | + . '</p> |
|
105 | 105 | </div>'; |
106 | - } |
|
107 | - } |
|
108 | - |
|
109 | - |
|
110 | - /** |
|
111 | - * Gets the injected table analyzer, or throws an exception |
|
112 | - * |
|
113 | - * @return TableAnalysis |
|
114 | - * @throws EE_Error |
|
115 | - */ |
|
116 | - protected function _get_table_analysis() |
|
117 | - { |
|
118 | - if ($this->_table_analysis instanceof TableAnalysis) { |
|
119 | - return $this->_table_analysis; |
|
120 | - } else { |
|
121 | - throw new EE_Error( |
|
122 | - sprintf( |
|
123 | - esc_html__('Table analysis class on class %1$s is not set properly.', 'event_espresso'), |
|
124 | - get_class($this) |
|
125 | - ) |
|
126 | - ); |
|
127 | - } |
|
128 | - } |
|
129 | - |
|
130 | - |
|
131 | - /** |
|
132 | - * Hide PayPal Standard for "new" users. |
|
133 | - * |
|
134 | - * @throws EE_Error |
|
135 | - * @throws ReflectionException |
|
136 | - */ |
|
137 | - public static function unset_pp_standard($payment_method_types) |
|
138 | - { |
|
139 | - $pps = EEM_Payment_Method::instance()->get_one_of_type('Paypal_Standard'); |
|
140 | - $paypal_standard_active = ! empty($pps) && $pps->active(); |
|
141 | - $paypal_standard_active_before = false; |
|
142 | - if ($pps) { |
|
143 | - // PP Standard used before ? |
|
144 | - $paypal_id = $pps->get_extra_meta('paypal_id', true); |
|
145 | - if ($paypal_id && ! empty($paypal_id)) { |
|
146 | - $paypal_standard_active_before = true; |
|
147 | - } |
|
148 | - } |
|
149 | - |
|
150 | - // Not using PP Standard? Then display only PayPal Express, do not show PayPal Standard. |
|
151 | - if ( |
|
152 | - apply_filters( |
|
153 | - 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', |
|
154 | - ! $paypal_standard_active && ! $paypal_standard_active_before |
|
155 | - ) |
|
156 | - ) { |
|
157 | - unset($payment_method_types['paypal_standard']); |
|
158 | - } |
|
159 | - return $payment_method_types; |
|
160 | - } |
|
106 | + } |
|
107 | + } |
|
108 | + |
|
109 | + |
|
110 | + /** |
|
111 | + * Gets the injected table analyzer, or throws an exception |
|
112 | + * |
|
113 | + * @return TableAnalysis |
|
114 | + * @throws EE_Error |
|
115 | + */ |
|
116 | + protected function _get_table_analysis() |
|
117 | + { |
|
118 | + if ($this->_table_analysis instanceof TableAnalysis) { |
|
119 | + return $this->_table_analysis; |
|
120 | + } else { |
|
121 | + throw new EE_Error( |
|
122 | + sprintf( |
|
123 | + esc_html__('Table analysis class on class %1$s is not set properly.', 'event_espresso'), |
|
124 | + get_class($this) |
|
125 | + ) |
|
126 | + ); |
|
127 | + } |
|
128 | + } |
|
129 | + |
|
130 | + |
|
131 | + /** |
|
132 | + * Hide PayPal Standard for "new" users. |
|
133 | + * |
|
134 | + * @throws EE_Error |
|
135 | + * @throws ReflectionException |
|
136 | + */ |
|
137 | + public static function unset_pp_standard($payment_method_types) |
|
138 | + { |
|
139 | + $pps = EEM_Payment_Method::instance()->get_one_of_type('Paypal_Standard'); |
|
140 | + $paypal_standard_active = ! empty($pps) && $pps->active(); |
|
141 | + $paypal_standard_active_before = false; |
|
142 | + if ($pps) { |
|
143 | + // PP Standard used before ? |
|
144 | + $paypal_id = $pps->get_extra_meta('paypal_id', true); |
|
145 | + if ($paypal_id && ! empty($paypal_id)) { |
|
146 | + $paypal_standard_active_before = true; |
|
147 | + } |
|
148 | + } |
|
149 | + |
|
150 | + // Not using PP Standard? Then display only PayPal Express, do not show PayPal Standard. |
|
151 | + if ( |
|
152 | + apply_filters( |
|
153 | + 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', |
|
154 | + ! $paypal_standard_active && ! $paypal_standard_active_before |
|
155 | + ) |
|
156 | + ) { |
|
157 | + unset($payment_method_types['paypal_standard']); |
|
158 | + } |
|
159 | + return $payment_method_types; |
|
160 | + } |
|
161 | 161 | } |
@@ -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 |
@@ -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 | } |
@@ -13,49 +13,49 @@ |
||
13 | 13 | */ |
14 | 14 | class Messages_Admin_Page_Init extends EE_Admin_Page_Init |
15 | 15 | { |
16 | - /** |
|
17 | - *constructor |
|
18 | - * |
|
19 | - * @Constructor |
|
20 | - * @access public |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - public function __construct() |
|
24 | - { |
|
25 | - do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
26 | - |
|
27 | - if (! defined('EE_MSG_PG_SLUG')) { |
|
28 | - define('EE_MSG_PG_SLUG', 'espresso_messages'); |
|
29 | - define('EE_MSG_PG_NAME', ucwords(str_replace('_', '', EE_MSG_PG_SLUG))); |
|
30 | - define('EE_MSG_ADMIN', EE_ADMIN_PAGES . 'messages/'); |
|
31 | - define('EE_MSG_ADMIN_URL', admin_url('admin.php?page=' . EE_MSG_PG_SLUG)); |
|
32 | - define('EE_MSG_ASSETS_PATH', EE_MSG_ADMIN . 'assets/'); |
|
33 | - define('EE_MSG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'messages/assets/'); |
|
34 | - define('EE_MSG_TEMPLATE_PATH', EE_MSG_ADMIN . 'templates/'); |
|
35 | - define('EE_MSG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'messages/templates/'); |
|
36 | - } |
|
37 | - |
|
38 | - parent::__construct(); |
|
39 | - } |
|
40 | - |
|
41 | - |
|
42 | - protected function _set_init_properties() |
|
43 | - { |
|
44 | - $this->label = esc_html__('Messages System', 'event_espresso'); |
|
45 | - } |
|
46 | - |
|
47 | - |
|
48 | - public function getMenuProperties(): array |
|
49 | - { |
|
50 | - return [ |
|
51 | - 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
52 | - 'menu_group' => 'management', |
|
53 | - 'menu_order' => 10, |
|
54 | - 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
55 | - 'parent_slug' => 'espresso_events', |
|
56 | - 'menu_slug' => EE_MSG_PG_SLUG, |
|
57 | - 'menu_label' => esc_html__('Messages', 'event_espresso'), |
|
58 | - 'capability' => 'ee_read_global_messages', |
|
59 | - ]; |
|
60 | - } |
|
16 | + /** |
|
17 | + *constructor |
|
18 | + * |
|
19 | + * @Constructor |
|
20 | + * @access public |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + public function __construct() |
|
24 | + { |
|
25 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
26 | + |
|
27 | + if (! defined('EE_MSG_PG_SLUG')) { |
|
28 | + define('EE_MSG_PG_SLUG', 'espresso_messages'); |
|
29 | + define('EE_MSG_PG_NAME', ucwords(str_replace('_', '', EE_MSG_PG_SLUG))); |
|
30 | + define('EE_MSG_ADMIN', EE_ADMIN_PAGES . 'messages/'); |
|
31 | + define('EE_MSG_ADMIN_URL', admin_url('admin.php?page=' . EE_MSG_PG_SLUG)); |
|
32 | + define('EE_MSG_ASSETS_PATH', EE_MSG_ADMIN . 'assets/'); |
|
33 | + define('EE_MSG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'messages/assets/'); |
|
34 | + define('EE_MSG_TEMPLATE_PATH', EE_MSG_ADMIN . 'templates/'); |
|
35 | + define('EE_MSG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'messages/templates/'); |
|
36 | + } |
|
37 | + |
|
38 | + parent::__construct(); |
|
39 | + } |
|
40 | + |
|
41 | + |
|
42 | + protected function _set_init_properties() |
|
43 | + { |
|
44 | + $this->label = esc_html__('Messages System', 'event_espresso'); |
|
45 | + } |
|
46 | + |
|
47 | + |
|
48 | + public function getMenuProperties(): array |
|
49 | + { |
|
50 | + return [ |
|
51 | + 'menu_type' => AdminMenuItem::TYPE_MENU_SUB_ITEM, |
|
52 | + 'menu_group' => 'management', |
|
53 | + 'menu_order' => 10, |
|
54 | + 'show_on_menu' => AdminMenuItem::DISPLAY_BLOG_ONLY, |
|
55 | + 'parent_slug' => 'espresso_events', |
|
56 | + 'menu_slug' => EE_MSG_PG_SLUG, |
|
57 | + 'menu_label' => esc_html__('Messages', 'event_espresso'), |
|
58 | + 'capability' => 'ee_read_global_messages', |
|
59 | + ]; |
|
60 | + } |
|
61 | 61 | } |
@@ -24,15 +24,15 @@ |
||
24 | 24 | { |
25 | 25 | do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
26 | 26 | |
27 | - if (! defined('EE_MSG_PG_SLUG')) { |
|
27 | + if ( ! defined('EE_MSG_PG_SLUG')) { |
|
28 | 28 | define('EE_MSG_PG_SLUG', 'espresso_messages'); |
29 | 29 | define('EE_MSG_PG_NAME', ucwords(str_replace('_', '', EE_MSG_PG_SLUG))); |
30 | - define('EE_MSG_ADMIN', EE_ADMIN_PAGES . 'messages/'); |
|
31 | - define('EE_MSG_ADMIN_URL', admin_url('admin.php?page=' . EE_MSG_PG_SLUG)); |
|
32 | - define('EE_MSG_ASSETS_PATH', EE_MSG_ADMIN . 'assets/'); |
|
33 | - define('EE_MSG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'messages/assets/'); |
|
34 | - define('EE_MSG_TEMPLATE_PATH', EE_MSG_ADMIN . 'templates/'); |
|
35 | - define('EE_MSG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'messages/templates/'); |
|
30 | + define('EE_MSG_ADMIN', EE_ADMIN_PAGES.'messages/'); |
|
31 | + define('EE_MSG_ADMIN_URL', admin_url('admin.php?page='.EE_MSG_PG_SLUG)); |
|
32 | + define('EE_MSG_ASSETS_PATH', EE_MSG_ADMIN.'assets/'); |
|
33 | + define('EE_MSG_ASSETS_URL', EE_ADMIN_PAGES_URL.'messages/assets/'); |
|
34 | + define('EE_MSG_TEMPLATE_PATH', EE_MSG_ADMIN.'templates/'); |
|
35 | + define('EE_MSG_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'messages/templates/'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | parent::__construct(); |
@@ -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 | } |