@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | { |
37 | 37 | if (isset($input_settings['value_field_name'])) { |
38 | 38 | $this->valueFieldName = $input_settings['value_field_name']; |
39 | - if (! EEM_State::instance()->has_field((string) $this->valueFieldName())) { |
|
39 | + if ( ! EEM_State::instance()->has_field((string) $this->valueFieldName())) { |
|
40 | 40 | throw new InvalidArgumentException( |
41 | 41 | sprintf( |
42 | 42 | esc_html__('An invalid state field "%1$s" was specified for the state input\'s option values.', 'event_espresso'), |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $this |
54 | 54 | ); |
55 | 55 | $input_settings['html_class'] = isset($input_settings['html_class']) |
56 | - ? $input_settings['html_class'] . ' ee-state-select-js' |
|
56 | + ? $input_settings['html_class'].' ee-state-select-js' |
|
57 | 57 | : 'ee-state-select-js'; |
58 | 58 | parent::__construct($state_options, $input_settings); |
59 | 59 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | public function get_state_answer_options($state_options = null) |
84 | 84 | { |
85 | 85 | // if passed something that is NOT an array |
86 | - if (! is_array($state_options) || empty($state_options)) { |
|
86 | + if ( ! is_array($state_options) || empty($state_options)) { |
|
87 | 87 | // get possibly cached list of states |
88 | 88 | $states = EEM_State::instance()->get_all_active_states(); |
89 | 89 | } |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | $states = $state_options; |
92 | 92 | $state_options = array(); |
93 | 93 | } |
94 | - if (! empty($states)) { |
|
94 | + if ( ! empty($states)) { |
|
95 | 95 | // set the default |
96 | 96 | $state_options[''][''] = ''; |
97 | 97 | foreach ($states as $state) { |
98 | 98 | if ($state instanceof EE_State) { |
99 | - $state_options[ $state->country()->name() ][ $state->get($this->valueFieldName()) ] = $state->name(); |
|
99 | + $state_options[$state->country()->name()][$state->get($this->valueFieldName())] = $state->name(); |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | } |
@@ -12,94 +12,94 @@ |
||
12 | 12 | */ |
13 | 13 | class EE_State_Select_Input extends EE_Select_Input |
14 | 14 | { |
15 | - /** |
|
16 | - * @var string the name of the EE_State field to use for option values in the HTML form input. |
|
17 | - */ |
|
18 | - protected $valueFieldName; |
|
15 | + /** |
|
16 | + * @var string the name of the EE_State field to use for option values in the HTML form input. |
|
17 | + */ |
|
18 | + protected $valueFieldName; |
|
19 | 19 | |
20 | - /** |
|
21 | - * @param EE_State[]|array|null $state_options. If a flat array of string is provided, |
|
22 | - * $input_settings['value_field_name'] is ignored. If an array of states is passed, that field will be used for |
|
23 | - * the keys (which will become the option values). If null or empty is passed, all active states will be used, |
|
24 | - * and $input_settings['value_field_name'] will again be used. * |
|
25 | - * @param array $input_settings same as parent, but also { |
|
26 | - * @type string $value_field_name the name of the field to use |
|
27 | - * for the HTML option values, ie, `STA_ID`, `STA_abbrev`, or `STA_name`. |
|
28 | - * } |
|
29 | - * @throws EE_Error |
|
30 | - * @throws InvalidArgumentException |
|
31 | - * @throws InvalidDataTypeException |
|
32 | - * @throws InvalidInterfaceException |
|
33 | - * @throws ReflectionException |
|
34 | - */ |
|
35 | - public function __construct($state_options, $input_settings = array()) |
|
36 | - { |
|
37 | - if (isset($input_settings['value_field_name'])) { |
|
38 | - $this->valueFieldName = $input_settings['value_field_name']; |
|
39 | - if (! EEM_State::instance()->has_field((string) $this->valueFieldName())) { |
|
40 | - throw new InvalidArgumentException( |
|
41 | - sprintf( |
|
42 | - esc_html__('An invalid state field "%1$s" was specified for the state input\'s option values.', 'event_espresso'), |
|
43 | - $this->valueFieldName() |
|
44 | - ) |
|
45 | - ); |
|
46 | - } |
|
47 | - } else { |
|
48 | - $this->valueFieldName = 'STA_ID'; |
|
49 | - } |
|
50 | - $state_options = apply_filters( |
|
51 | - 'FHEE__EE_State_Select_Input____construct__state_options', |
|
52 | - $this->get_state_answer_options($state_options), |
|
53 | - $this |
|
54 | - ); |
|
55 | - $input_settings['html_class'] = isset($input_settings['html_class']) |
|
56 | - ? $input_settings['html_class'] . ' ee-state-select-js' |
|
57 | - : 'ee-state-select-js'; |
|
58 | - parent::__construct($state_options, $input_settings); |
|
59 | - } |
|
20 | + /** |
|
21 | + * @param EE_State[]|array|null $state_options. If a flat array of string is provided, |
|
22 | + * $input_settings['value_field_name'] is ignored. If an array of states is passed, that field will be used for |
|
23 | + * the keys (which will become the option values). If null or empty is passed, all active states will be used, |
|
24 | + * and $input_settings['value_field_name'] will again be used. * |
|
25 | + * @param array $input_settings same as parent, but also { |
|
26 | + * @type string $value_field_name the name of the field to use |
|
27 | + * for the HTML option values, ie, `STA_ID`, `STA_abbrev`, or `STA_name`. |
|
28 | + * } |
|
29 | + * @throws EE_Error |
|
30 | + * @throws InvalidArgumentException |
|
31 | + * @throws InvalidDataTypeException |
|
32 | + * @throws InvalidInterfaceException |
|
33 | + * @throws ReflectionException |
|
34 | + */ |
|
35 | + public function __construct($state_options, $input_settings = array()) |
|
36 | + { |
|
37 | + if (isset($input_settings['value_field_name'])) { |
|
38 | + $this->valueFieldName = $input_settings['value_field_name']; |
|
39 | + if (! EEM_State::instance()->has_field((string) $this->valueFieldName())) { |
|
40 | + throw new InvalidArgumentException( |
|
41 | + sprintf( |
|
42 | + esc_html__('An invalid state field "%1$s" was specified for the state input\'s option values.', 'event_espresso'), |
|
43 | + $this->valueFieldName() |
|
44 | + ) |
|
45 | + ); |
|
46 | + } |
|
47 | + } else { |
|
48 | + $this->valueFieldName = 'STA_ID'; |
|
49 | + } |
|
50 | + $state_options = apply_filters( |
|
51 | + 'FHEE__EE_State_Select_Input____construct__state_options', |
|
52 | + $this->get_state_answer_options($state_options), |
|
53 | + $this |
|
54 | + ); |
|
55 | + $input_settings['html_class'] = isset($input_settings['html_class']) |
|
56 | + ? $input_settings['html_class'] . ' ee-state-select-js' |
|
57 | + : 'ee-state-select-js'; |
|
58 | + parent::__construct($state_options, $input_settings); |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * Returns the name of the state field used for the HTML option values. |
|
63 | - * @since 4.10.0.p |
|
64 | - * @return string |
|
65 | - */ |
|
66 | - public function valueFieldName() |
|
67 | - { |
|
68 | - return $this->valueFieldName; |
|
69 | - } |
|
61 | + /** |
|
62 | + * Returns the name of the state field used for the HTML option values. |
|
63 | + * @since 4.10.0.p |
|
64 | + * @return string |
|
65 | + */ |
|
66 | + public function valueFieldName() |
|
67 | + { |
|
68 | + return $this->valueFieldName; |
|
69 | + } |
|
70 | 70 | |
71 | 71 | |
72 | - /** |
|
73 | - * get_state_answer_options |
|
74 | - * |
|
75 | - * @param array $state_options |
|
76 | - * @return array |
|
77 | - * @throws EE_Error |
|
78 | - * @throws InvalidArgumentException |
|
79 | - * @throws ReflectionException |
|
80 | - * @throws InvalidDataTypeException |
|
81 | - * @throws InvalidInterfaceException |
|
82 | - */ |
|
83 | - public function get_state_answer_options($state_options = null) |
|
84 | - { |
|
85 | - // if passed something that is NOT an array |
|
86 | - if (! is_array($state_options) || empty($state_options)) { |
|
87 | - // get possibly cached list of states |
|
88 | - $states = EEM_State::instance()->get_all_active_states(); |
|
89 | - } |
|
90 | - if (is_array($state_options) && reset($state_options) instanceof EE_State) { |
|
91 | - $states = $state_options; |
|
92 | - $state_options = array(); |
|
93 | - } |
|
94 | - if (! empty($states)) { |
|
95 | - // set the default |
|
96 | - $state_options[''][''] = ''; |
|
97 | - foreach ($states as $state) { |
|
98 | - if ($state instanceof EE_State) { |
|
99 | - $state_options[ $state->country()->name() ][ $state->get($this->valueFieldName()) ] = $state->name(); |
|
100 | - } |
|
101 | - } |
|
102 | - } |
|
103 | - return $state_options; |
|
104 | - } |
|
72 | + /** |
|
73 | + * get_state_answer_options |
|
74 | + * |
|
75 | + * @param array $state_options |
|
76 | + * @return array |
|
77 | + * @throws EE_Error |
|
78 | + * @throws InvalidArgumentException |
|
79 | + * @throws ReflectionException |
|
80 | + * @throws InvalidDataTypeException |
|
81 | + * @throws InvalidInterfaceException |
|
82 | + */ |
|
83 | + public function get_state_answer_options($state_options = null) |
|
84 | + { |
|
85 | + // if passed something that is NOT an array |
|
86 | + if (! is_array($state_options) || empty($state_options)) { |
|
87 | + // get possibly cached list of states |
|
88 | + $states = EEM_State::instance()->get_all_active_states(); |
|
89 | + } |
|
90 | + if (is_array($state_options) && reset($state_options) instanceof EE_State) { |
|
91 | + $states = $state_options; |
|
92 | + $state_options = array(); |
|
93 | + } |
|
94 | + if (! empty($states)) { |
|
95 | + // set the default |
|
96 | + $state_options[''][''] = ''; |
|
97 | + foreach ($states as $state) { |
|
98 | + if ($state instanceof EE_State) { |
|
99 | + $state_options[ $state->country()->name() ][ $state->get($this->valueFieldName()) ] = $state->name(); |
|
100 | + } |
|
101 | + } |
|
102 | + } |
|
103 | + return $state_options; |
|
104 | + } |
|
105 | 105 | } |
@@ -13,58 +13,58 @@ |
||
13 | 13 | { |
14 | 14 | |
15 | 15 | |
16 | - /** |
|
17 | - * @Constructor |
|
18 | - * @access public |
|
19 | - * @return Transactions_Admin_Page_Init |
|
20 | - */ |
|
21 | - public function __construct() |
|
22 | - { |
|
16 | + /** |
|
17 | + * @Constructor |
|
18 | + * @access public |
|
19 | + * @return Transactions_Admin_Page_Init |
|
20 | + */ |
|
21 | + public function __construct() |
|
22 | + { |
|
23 | 23 | |
24 | - do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
25 | - if (! defined('TXN_PG_SLUG')) { |
|
26 | - define('TXN_PG_SLUG', 'espresso_transactions'); |
|
27 | - define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG))); |
|
28 | - define('TXN_ADMIN', EE_ADMIN_PAGES . 'transactions/'); |
|
29 | - define('TXN_ADMIN_URL', admin_url('admin.php?page=' . TXN_PG_SLUG)); |
|
30 | - define('TXN_ASSETS_PATH', TXN_ADMIN . 'assets/'); |
|
31 | - define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets/')); |
|
32 | - define('TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates/'); |
|
33 | - define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates/')); |
|
34 | - } |
|
35 | - parent::__construct(); |
|
36 | - } |
|
24 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
25 | + if (! defined('TXN_PG_SLUG')) { |
|
26 | + define('TXN_PG_SLUG', 'espresso_transactions'); |
|
27 | + define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG))); |
|
28 | + define('TXN_ADMIN', EE_ADMIN_PAGES . 'transactions/'); |
|
29 | + define('TXN_ADMIN_URL', admin_url('admin.php?page=' . TXN_PG_SLUG)); |
|
30 | + define('TXN_ASSETS_PATH', TXN_ADMIN . 'assets/'); |
|
31 | + define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets/')); |
|
32 | + define('TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates/'); |
|
33 | + define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates/')); |
|
34 | + } |
|
35 | + parent::__construct(); |
|
36 | + } |
|
37 | 37 | |
38 | 38 | |
39 | - /** |
|
40 | - * _set_init_properties |
|
41 | - * |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - protected function _set_init_properties() |
|
45 | - { |
|
46 | - $this->label = __('Transactions Overview', 'event_espresso'); |
|
47 | - } |
|
39 | + /** |
|
40 | + * _set_init_properties |
|
41 | + * |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + protected function _set_init_properties() |
|
45 | + { |
|
46 | + $this->label = __('Transactions Overview', 'event_espresso'); |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * _set_menu_map |
|
52 | - * |
|
53 | - * @return void |
|
54 | - */ |
|
55 | - protected function _set_menu_map() |
|
56 | - { |
|
57 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
58 | - array( |
|
59 | - 'menu_group' => 'main', |
|
60 | - 'menu_order' => 50, |
|
61 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
62 | - 'parent_slug' => 'espresso_events', |
|
63 | - 'menu_slug' => TXN_PG_SLUG, |
|
64 | - 'menu_label' => __('Transactions', 'event_espresso'), |
|
65 | - 'capability' => 'ee_read_transactions', |
|
66 | - 'admin_init_page' => $this, |
|
67 | - ) |
|
68 | - ); |
|
69 | - } |
|
50 | + /** |
|
51 | + * _set_menu_map |
|
52 | + * |
|
53 | + * @return void |
|
54 | + */ |
|
55 | + protected function _set_menu_map() |
|
56 | + { |
|
57 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
58 | + array( |
|
59 | + 'menu_group' => 'main', |
|
60 | + 'menu_order' => 50, |
|
61 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
62 | + 'parent_slug' => 'espresso_events', |
|
63 | + 'menu_slug' => TXN_PG_SLUG, |
|
64 | + 'menu_label' => __('Transactions', 'event_espresso'), |
|
65 | + 'capability' => 'ee_read_transactions', |
|
66 | + 'admin_init_page' => $this, |
|
67 | + ) |
|
68 | + ); |
|
69 | + } |
|
70 | 70 | } |
@@ -22,15 +22,15 @@ |
||
22 | 22 | { |
23 | 23 | |
24 | 24 | do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
25 | - if (! defined('TXN_PG_SLUG')) { |
|
25 | + if ( ! defined('TXN_PG_SLUG')) { |
|
26 | 26 | define('TXN_PG_SLUG', 'espresso_transactions'); |
27 | 27 | define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG))); |
28 | - define('TXN_ADMIN', EE_ADMIN_PAGES . 'transactions/'); |
|
29 | - define('TXN_ADMIN_URL', admin_url('admin.php?page=' . TXN_PG_SLUG)); |
|
30 | - define('TXN_ASSETS_PATH', TXN_ADMIN . 'assets/'); |
|
31 | - define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets/')); |
|
32 | - define('TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates/'); |
|
33 | - define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates/')); |
|
28 | + define('TXN_ADMIN', EE_ADMIN_PAGES.'transactions/'); |
|
29 | + define('TXN_ADMIN_URL', admin_url('admin.php?page='.TXN_PG_SLUG)); |
|
30 | + define('TXN_ASSETS_PATH', TXN_ADMIN.'assets/'); |
|
31 | + define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/assets/')); |
|
32 | + define('TXN_TEMPLATE_PATH', TXN_ADMIN.'templates/'); |
|
33 | + define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/templates/')); |
|
34 | 34 | } |
35 | 35 | parent::__construct(); |
36 | 36 | } |
@@ -18,37 +18,37 @@ |
||
18 | 18 | class General_Settings_Admin_Page_Init extends EE_Admin_Page_Init |
19 | 19 | { |
20 | 20 | |
21 | - public function __construct() |
|
22 | - { |
|
23 | - // define some constants |
|
24 | - define('GEN_SET_PG_SLUG', 'espresso_general_settings'); |
|
25 | - define('GEN_SET_LABEL', __('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/'); |
|
21 | + public function __construct() |
|
22 | + { |
|
23 | + // define some constants |
|
24 | + define('GEN_SET_PG_SLUG', 'espresso_general_settings'); |
|
25 | + define('GEN_SET_LABEL', __('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 | 30 | |
31 | - parent::__construct(); |
|
32 | - } |
|
31 | + parent::__construct(); |
|
32 | + } |
|
33 | 33 | |
34 | - protected function _set_init_properties() |
|
35 | - { |
|
36 | - $this->label = GEN_SET_LABEL; |
|
37 | - } |
|
34 | + protected function _set_init_properties() |
|
35 | + { |
|
36 | + $this->label = GEN_SET_LABEL; |
|
37 | + } |
|
38 | 38 | |
39 | - protected function _set_menu_map() |
|
40 | - { |
|
41 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
42 | - array( |
|
43 | - 'menu_group' => 'settings', |
|
44 | - 'menu_order' => 20, |
|
45 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
46 | - 'parent_slug' => 'espresso_events', |
|
47 | - 'menu_slug' => GEN_SET_PG_SLUG, |
|
48 | - 'menu_label' => GEN_SET_LABEL, |
|
49 | - 'capability' => 'manage_options', |
|
50 | - 'admin_init_page' => $this, |
|
51 | - ) |
|
52 | - ); |
|
53 | - } |
|
39 | + protected function _set_menu_map() |
|
40 | + { |
|
41 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
42 | + array( |
|
43 | + 'menu_group' => 'settings', |
|
44 | + 'menu_order' => 20, |
|
45 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
46 | + 'parent_slug' => 'espresso_events', |
|
47 | + 'menu_slug' => GEN_SET_PG_SLUG, |
|
48 | + 'menu_label' => GEN_SET_LABEL, |
|
49 | + 'capability' => 'manage_options', |
|
50 | + 'admin_init_page' => $this, |
|
51 | + ) |
|
52 | + ); |
|
53 | + } |
|
54 | 54 | } |
@@ -23,10 +23,10 @@ |
||
23 | 23 | // define some constants |
24 | 24 | define('GEN_SET_PG_SLUG', 'espresso_general_settings'); |
25 | 25 | define('GEN_SET_LABEL', __('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 | } |
@@ -24,102 +24,102 @@ |
||
24 | 24 | { |
25 | 25 | |
26 | 26 | |
27 | - public function __construct() |
|
28 | - { |
|
29 | - // define some page related constants |
|
30 | - define('EE_MAINTENANCE_LABEL', __('Maintenance', 'event_espresso')); |
|
31 | - define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings'); |
|
32 | - define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page=' . EE_MAINTENANCE_PG_SLUG)); |
|
33 | - define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance/'); |
|
34 | - define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates/'); |
|
35 | - define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/'); |
|
36 | - // check that if we're in maintenance mode that we tell the admin that |
|
37 | - add_action('admin_notices', array($this, 'check_maintenance_mode')); |
|
38 | - parent::__construct(); |
|
39 | - } |
|
27 | + public function __construct() |
|
28 | + { |
|
29 | + // define some page related constants |
|
30 | + define('EE_MAINTENANCE_LABEL', __('Maintenance', 'event_espresso')); |
|
31 | + define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings'); |
|
32 | + define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page=' . EE_MAINTENANCE_PG_SLUG)); |
|
33 | + define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance/'); |
|
34 | + define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates/'); |
|
35 | + define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/'); |
|
36 | + // check that if we're in maintenance mode that we tell the admin that |
|
37 | + add_action('admin_notices', array($this, 'check_maintenance_mode')); |
|
38 | + parent::__construct(); |
|
39 | + } |
|
40 | 40 | |
41 | 41 | |
42 | - protected function _set_init_properties() |
|
43 | - { |
|
44 | - $this->label = EE_MAINTENANCE_LABEL; |
|
45 | - } |
|
42 | + protected function _set_init_properties() |
|
43 | + { |
|
44 | + $this->label = EE_MAINTENANCE_LABEL; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - protected function _set_menu_map() |
|
49 | - { |
|
50 | - $menu_map = $this->_menu_map(); |
|
51 | - $this->_menu_map = EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance |
|
52 | - ? new EE_Admin_Page_Main_Menu($menu_map) : new EE_Admin_Page_Sub_Menu($menu_map); |
|
53 | - } |
|
48 | + protected function _set_menu_map() |
|
49 | + { |
|
50 | + $menu_map = $this->_menu_map(); |
|
51 | + $this->_menu_map = EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance |
|
52 | + ? new EE_Admin_Page_Main_Menu($menu_map) : new EE_Admin_Page_Sub_Menu($menu_map); |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - protected function _menu_map() |
|
57 | - { |
|
58 | - $map = array( |
|
59 | - 'menu_group' => 'extras', |
|
60 | - 'menu_order' => 30, |
|
61 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
62 | - 'parent_slug' => 'espresso_events', |
|
63 | - 'menu_slug' => EE_MAINTENANCE_PG_SLUG, |
|
64 | - 'menu_label' => EE_MAINTENANCE_LABEL, |
|
65 | - 'capability' => 'manage_options', |
|
66 | - 'maintenance_mode_parent' => EE_MAINTENANCE_PG_SLUG, |
|
67 | - 'admin_init_page' => $this, |
|
68 | - ); |
|
69 | - if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) { |
|
70 | - $map['menu_group'] = 'main'; |
|
71 | - $map['subtitle'] = EE_MAINTENANCE_LABEL; |
|
72 | - $map['menu_label'] = __('Event Espresso', 'event_espresso'); |
|
73 | - } |
|
74 | - return $map; |
|
75 | - } |
|
56 | + protected function _menu_map() |
|
57 | + { |
|
58 | + $map = array( |
|
59 | + 'menu_group' => 'extras', |
|
60 | + 'menu_order' => 30, |
|
61 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
62 | + 'parent_slug' => 'espresso_events', |
|
63 | + 'menu_slug' => EE_MAINTENANCE_PG_SLUG, |
|
64 | + 'menu_label' => EE_MAINTENANCE_LABEL, |
|
65 | + 'capability' => 'manage_options', |
|
66 | + 'maintenance_mode_parent' => EE_MAINTENANCE_PG_SLUG, |
|
67 | + 'admin_init_page' => $this, |
|
68 | + ); |
|
69 | + if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) { |
|
70 | + $map['menu_group'] = 'main'; |
|
71 | + $map['subtitle'] = EE_MAINTENANCE_LABEL; |
|
72 | + $map['menu_label'] = __('Event Espresso', 'event_espresso'); |
|
73 | + } |
|
74 | + return $map; |
|
75 | + } |
|
76 | 76 | |
77 | 77 | |
78 | - /** |
|
79 | - * Checks if we're in maintenance mode, and if so we notify the admin adn tell them how to take the site OUT of |
|
80 | - * maintenance mode |
|
81 | - */ |
|
82 | - public function check_maintenance_mode() |
|
83 | - { |
|
84 | - $notice = ''; |
|
85 | - $maintenance_page_url = ''; |
|
86 | - if (EE_Maintenance_Mode::instance()->level()) { |
|
87 | - $maintenance_page_url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_MAINTENANCE_ADMIN_URL); |
|
88 | - switch (EE_Maintenance_Mode::instance()->level()) { |
|
89 | - case EE_Maintenance_Mode::level_1_frontend_only_maintenance: |
|
90 | - $notice = '<div class="update-nag"> |
|
78 | + /** |
|
79 | + * Checks if we're in maintenance mode, and if so we notify the admin adn tell them how to take the site OUT of |
|
80 | + * maintenance mode |
|
81 | + */ |
|
82 | + public function check_maintenance_mode() |
|
83 | + { |
|
84 | + $notice = ''; |
|
85 | + $maintenance_page_url = ''; |
|
86 | + if (EE_Maintenance_Mode::instance()->level()) { |
|
87 | + $maintenance_page_url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_MAINTENANCE_ADMIN_URL); |
|
88 | + switch (EE_Maintenance_Mode::instance()->level()) { |
|
89 | + case EE_Maintenance_Mode::level_1_frontend_only_maintenance: |
|
90 | + $notice = '<div class="update-nag"> |
|
91 | 91 | ' |
92 | - . sprintf( |
|
93 | - __( |
|
94 | - "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.", |
|
95 | - "event_espresso" |
|
96 | - ), |
|
97 | - "<a href='$maintenance_page_url'>", |
|
98 | - "</a>" |
|
99 | - ) |
|
100 | - . |
|
101 | - '</div>'; |
|
102 | - break; |
|
103 | - case EE_Maintenance_Mode::level_2_complete_maintenance: |
|
104 | - $notice = '<div class="error"> |
|
92 | + . sprintf( |
|
93 | + __( |
|
94 | + "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.", |
|
95 | + "event_espresso" |
|
96 | + ), |
|
97 | + "<a href='$maintenance_page_url'>", |
|
98 | + "</a>" |
|
99 | + ) |
|
100 | + . |
|
101 | + '</div>'; |
|
102 | + break; |
|
103 | + case EE_Maintenance_Mode::level_2_complete_maintenance: |
|
104 | + $notice = '<div class="error"> |
|
105 | 105 | <p>' |
106 | - . sprintf( |
|
107 | - __( |
|
108 | - "As part of the process for updating Event Espresso, your database also |
|
106 | + . sprintf( |
|
107 | + __( |
|
108 | + "As part of the process for updating Event Espresso, your database also |
|
109 | 109 | 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.", |
110 | - "event_espresso" |
|
111 | - ), |
|
112 | - "<a href='$maintenance_page_url'>", |
|
113 | - "</a>" |
|
114 | - ) . |
|
115 | - '</div>'; |
|
116 | - break; |
|
117 | - } |
|
118 | - } |
|
119 | - echo apply_filters( |
|
120 | - 'FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', |
|
121 | - $notice, |
|
122 | - $maintenance_page_url |
|
123 | - ); |
|
124 | - } |
|
110 | + "event_espresso" |
|
111 | + ), |
|
112 | + "<a href='$maintenance_page_url'>", |
|
113 | + "</a>" |
|
114 | + ) . |
|
115 | + '</div>'; |
|
116 | + break; |
|
117 | + } |
|
118 | + } |
|
119 | + echo apply_filters( |
|
120 | + 'FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', |
|
121 | + $notice, |
|
122 | + $maintenance_page_url |
|
123 | + ); |
|
124 | + } |
|
125 | 125 | } |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | // define some page related constants |
30 | 30 | define('EE_MAINTENANCE_LABEL', __('Maintenance', 'event_espresso')); |
31 | 31 | define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings'); |
32 | - define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page=' . EE_MAINTENANCE_PG_SLUG)); |
|
33 | - define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance/'); |
|
34 | - define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates/'); |
|
35 | - define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/'); |
|
32 | + define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page='.EE_MAINTENANCE_PG_SLUG)); |
|
33 | + define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES.'maintenance/'); |
|
34 | + define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN.'templates/'); |
|
35 | + define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL.'maintenance/assets/'); |
|
36 | 36 | // check that if we're in maintenance mode that we tell the admin that |
37 | 37 | add_action('admin_notices', array($this, 'check_maintenance_mode')); |
38 | 38 | parent::__construct(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ), |
112 | 112 | "<a href='$maintenance_page_url'>", |
113 | 113 | "</a>" |
114 | - ) . |
|
114 | + ). |
|
115 | 115 | '</div>'; |
116 | 116 | break; |
117 | 117 | } |
@@ -14,42 +14,42 @@ |
||
14 | 14 | class Events_Admin_Page_Init extends EE_Admin_Page_CPT_Init |
15 | 15 | { |
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', __('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', __('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 | - protected function _set_init_properties() |
|
35 | - { |
|
36 | - $this->label = __('Event Espresso - Event Details', 'event_espresso'); |
|
37 | - } |
|
34 | + protected function _set_init_properties() |
|
35 | + { |
|
36 | + $this->label = __('Event Espresso - Event Details', 'event_espresso'); |
|
37 | + } |
|
38 | 38 | |
39 | - protected function _set_menu_map() |
|
40 | - { |
|
41 | - $this->_menu_map = new EE_Admin_Page_Main_Menu( |
|
42 | - array( |
|
43 | - 'menu_group' => 'main', |
|
44 | - 'menu_order' => 10, |
|
45 | - 'subtitle' => __('Events', 'event_espresso'), |
|
46 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
47 | - 'parent_slug' => 'espresso_events', |
|
48 | - 'menu_slug' => 'espresso_events', |
|
49 | - 'menu_label' => __('Event Espresso', 'event_espresso'), |
|
50 | - 'capability' => 'ee_read_events', |
|
51 | - 'admin_init_page' => $this, |
|
52 | - ) |
|
53 | - ); |
|
54 | - } |
|
39 | + protected function _set_menu_map() |
|
40 | + { |
|
41 | + $this->_menu_map = new EE_Admin_Page_Main_Menu( |
|
42 | + array( |
|
43 | + 'menu_group' => 'main', |
|
44 | + 'menu_order' => 10, |
|
45 | + 'subtitle' => __('Events', 'event_espresso'), |
|
46 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
47 | + 'parent_slug' => 'espresso_events', |
|
48 | + 'menu_slug' => 'espresso_events', |
|
49 | + 'menu_label' => __('Event Espresso', 'event_espresso'), |
|
50 | + 'capability' => 'ee_read_events', |
|
51 | + 'admin_init_page' => $this, |
|
52 | + ) |
|
53 | + ); |
|
54 | + } |
|
55 | 55 | } |
@@ -20,13 +20,13 @@ |
||
20 | 20 | * define some events related constants but only if not defined (need to check because unit tests |
21 | 21 | * may load) |
22 | 22 | */ |
23 | - if (! defined('EVENTS_PG_SLUG')) { |
|
23 | + if ( ! defined('EVENTS_PG_SLUG')) { |
|
24 | 24 | define('EVENTS_PG_SLUG', 'espresso_events'); |
25 | 25 | define('EVENTS_LABEL', __('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/'); |
|
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 | 30 | } |
31 | 31 | parent::__construct(); |
32 | 32 | } |
@@ -17,39 +17,39 @@ |
||
17 | 17 | { |
18 | 18 | |
19 | 19 | |
20 | - public function __construct() |
|
21 | - { |
|
22 | - // define some event categories related constants |
|
23 | - define('EE_VENUES_PG_SLUG', 'espresso_venues'); |
|
24 | - define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG)); |
|
25 | - define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/'); |
|
26 | - define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/'); |
|
20 | + public function __construct() |
|
21 | + { |
|
22 | + // define some event categories related constants |
|
23 | + define('EE_VENUES_PG_SLUG', 'espresso_venues'); |
|
24 | + define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG)); |
|
25 | + define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/'); |
|
26 | + define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/'); |
|
27 | 27 | |
28 | - parent::__construct(); |
|
29 | - $this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . '/'; |
|
30 | - } |
|
28 | + parent::__construct(); |
|
29 | + $this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . '/'; |
|
30 | + } |
|
31 | 31 | |
32 | - protected function _set_init_properties() |
|
33 | - { |
|
34 | - $this->label = __('Event Venues', 'event_espresso'); |
|
35 | - $this->menu_label = __('Venues', 'event_espresso'); |
|
36 | - $this->menu_slug = EE_VENUES_PG_SLUG; |
|
37 | - } |
|
32 | + protected function _set_init_properties() |
|
33 | + { |
|
34 | + $this->label = __('Event Venues', 'event_espresso'); |
|
35 | + $this->menu_label = __('Venues', 'event_espresso'); |
|
36 | + $this->menu_slug = EE_VENUES_PG_SLUG; |
|
37 | + } |
|
38 | 38 | |
39 | 39 | |
40 | - protected function _set_menu_map() |
|
41 | - { |
|
42 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
43 | - array( |
|
44 | - 'menu_group' => 'management', |
|
45 | - 'menu_order' => 40, |
|
46 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
47 | - 'parent_slug' => 'espresso_events', |
|
48 | - 'menu_slug' => EE_VENUES_PG_SLUG, |
|
49 | - 'menu_label' => __('Venues', 'event_espresso'), |
|
50 | - 'capability' => 'ee_read_venues', |
|
51 | - 'admin_init_page' => $this, |
|
52 | - ) |
|
53 | - ); |
|
54 | - } |
|
40 | + protected function _set_menu_map() |
|
41 | + { |
|
42 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
43 | + array( |
|
44 | + 'menu_group' => 'management', |
|
45 | + 'menu_order' => 40, |
|
46 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
47 | + 'parent_slug' => 'espresso_events', |
|
48 | + 'menu_slug' => EE_VENUES_PG_SLUG, |
|
49 | + 'menu_label' => __('Venues', 'event_espresso'), |
|
50 | + 'capability' => 'ee_read_venues', |
|
51 | + 'admin_init_page' => $this, |
|
52 | + ) |
|
53 | + ); |
|
54 | + } |
|
55 | 55 | } |
@@ -21,12 +21,12 @@ |
||
21 | 21 | { |
22 | 22 | // define some event categories related constants |
23 | 23 | define('EE_VENUES_PG_SLUG', 'espresso_venues'); |
24 | - define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG)); |
|
25 | - define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/'); |
|
26 | - define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/'); |
|
24 | + define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page='.EE_VENUES_PG_SLUG)); |
|
25 | + define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL.'venues/assets/'); |
|
26 | + define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES.'venues/templates/'); |
|
27 | 27 | |
28 | 28 | parent::__construct(); |
29 | - $this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . '/'; |
|
29 | + $this->_folder_path = EE_ADMIN_PAGES.$this->_folder_name.'/'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | protected function _set_init_properties() |
@@ -12,52 +12,52 @@ |
||
12 | 12 | */ |
13 | 13 | class Messages_Admin_Page_Init extends EE_Admin_Page_Init |
14 | 14 | { |
15 | - /** |
|
16 | - *constructor |
|
17 | - * |
|
18 | - * @Constructor |
|
19 | - * @access public |
|
20 | - * @return void |
|
21 | - */ |
|
22 | - public function __construct() |
|
23 | - { |
|
15 | + /** |
|
16 | + *constructor |
|
17 | + * |
|
18 | + * @Constructor |
|
19 | + * @access public |
|
20 | + * @return void |
|
21 | + */ |
|
22 | + public function __construct() |
|
23 | + { |
|
24 | 24 | |
25 | - do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
25 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
26 | 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 | - } |
|
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 | 37 | |
38 | - parent::__construct(); |
|
39 | - } |
|
38 | + parent::__construct(); |
|
39 | + } |
|
40 | 40 | |
41 | 41 | |
42 | - protected function _set_init_properties() |
|
43 | - { |
|
44 | - $this->label = __('Messages System', 'event_espresso'); |
|
45 | - } |
|
42 | + protected function _set_init_properties() |
|
43 | + { |
|
44 | + $this->label = __('Messages System', 'event_espresso'); |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - protected function _set_menu_map() |
|
49 | - { |
|
50 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
51 | - array( |
|
52 | - 'menu_group' => 'management', |
|
53 | - 'menu_order' => 10, |
|
54 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
55 | - 'parent_slug' => 'espresso_events', |
|
56 | - 'menu_slug' => EE_MSG_PG_SLUG, |
|
57 | - 'menu_label' => __('Messages', 'event_espresso'), |
|
58 | - 'capability' => 'ee_read_global_messages', |
|
59 | - 'admin_init_page' => $this, |
|
60 | - ) |
|
61 | - ); |
|
62 | - } |
|
48 | + protected function _set_menu_map() |
|
49 | + { |
|
50 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
51 | + array( |
|
52 | + 'menu_group' => 'management', |
|
53 | + 'menu_order' => 10, |
|
54 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
55 | + 'parent_slug' => 'espresso_events', |
|
56 | + 'menu_slug' => EE_MSG_PG_SLUG, |
|
57 | + 'menu_label' => __('Messages', 'event_espresso'), |
|
58 | + 'capability' => 'ee_read_global_messages', |
|
59 | + 'admin_init_page' => $this, |
|
60 | + ) |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | } |
@@ -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(); |
@@ -18,41 +18,41 @@ |
||
18 | 18 | class Registration_Form_Admin_Page_Init extends EE_Admin_Page_Init |
19 | 19 | { |
20 | 20 | |
21 | - public function __construct() |
|
22 | - { |
|
23 | - // define some constants |
|
24 | - define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form'); |
|
25 | - define('REGISTRATION_FORM_LABEL', __('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 | - parent::__construct(); |
|
35 | - } |
|
21 | + public function __construct() |
|
22 | + { |
|
23 | + // define some constants |
|
24 | + define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form'); |
|
25 | + define('REGISTRATION_FORM_LABEL', __('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 | + parent::__construct(); |
|
35 | + } |
|
36 | 36 | |
37 | - protected function _set_init_properties() |
|
38 | - { |
|
39 | - $this->label = __('Registration Form Overview', 'event_espresso'); |
|
40 | - } |
|
37 | + protected function _set_init_properties() |
|
38 | + { |
|
39 | + $this->label = __('Registration Form Overview', 'event_espresso'); |
|
40 | + } |
|
41 | 41 | |
42 | 42 | |
43 | - protected function _set_menu_map() |
|
44 | - { |
|
45 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
46 | - array( |
|
47 | - 'menu_group' => 'management', |
|
48 | - 'menu_order' => 30, |
|
49 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
50 | - 'parent_slug' => 'espresso_events', |
|
51 | - 'menu_slug' => REGISTRATION_FORM_PG_SLUG, |
|
52 | - 'menu_label' => __('Registration Form', 'event_espresso'), |
|
53 | - 'capability' => 'ee_read_questions', |
|
54 | - 'admin_init_page' => $this, |
|
55 | - ) |
|
56 | - ); |
|
57 | - } |
|
43 | + protected function _set_menu_map() |
|
44 | + { |
|
45 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
46 | + array( |
|
47 | + 'menu_group' => 'management', |
|
48 | + 'menu_order' => 30, |
|
49 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
50 | + 'parent_slug' => 'espresso_events', |
|
51 | + 'menu_slug' => REGISTRATION_FORM_PG_SLUG, |
|
52 | + 'menu_label' => __('Registration Form', 'event_espresso'), |
|
53 | + 'capability' => 'ee_read_questions', |
|
54 | + 'admin_init_page' => $this, |
|
55 | + ) |
|
56 | + ); |
|
57 | + } |
|
58 | 58 | } |
@@ -24,13 +24,13 @@ |
||
24 | 24 | define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form'); |
25 | 25 | define('REGISTRATION_FORM_LABEL', __('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 | parent::__construct(); |
35 | 35 | } |
36 | 36 |
@@ -14,37 +14,37 @@ |
||
14 | 14 | class About_Admin_Page_Init extends EE_Admin_Page_Init |
15 | 15 | { |
16 | 16 | |
17 | - public function __construct() |
|
18 | - { |
|
19 | - // define some events related constants |
|
20 | - define('EE_ABOUT_PG_SLUG', 'espresso_about'); |
|
21 | - define('EE_ABOUT_LABEL', __('About', 'event_espresso')); |
|
22 | - define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES . 'about/'); |
|
23 | - define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page=' . EE_ABOUT_PG_SLUG)); |
|
24 | - define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN . 'templates/'); |
|
25 | - define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'about/assets/'); |
|
26 | - parent::__construct(); |
|
27 | - } |
|
17 | + public function __construct() |
|
18 | + { |
|
19 | + // define some events related constants |
|
20 | + define('EE_ABOUT_PG_SLUG', 'espresso_about'); |
|
21 | + define('EE_ABOUT_LABEL', __('About', 'event_espresso')); |
|
22 | + define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES . 'about/'); |
|
23 | + define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page=' . EE_ABOUT_PG_SLUG)); |
|
24 | + define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN . 'templates/'); |
|
25 | + define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'about/assets/'); |
|
26 | + parent::__construct(); |
|
27 | + } |
|
28 | 28 | |
29 | - protected function _set_init_properties() |
|
30 | - { |
|
31 | - $this->label = __('About Event Espresso', 'event_espresso'); |
|
32 | - } |
|
29 | + protected function _set_init_properties() |
|
30 | + { |
|
31 | + $this->label = __('About Event Espresso', 'event_espresso'); |
|
32 | + } |
|
33 | 33 | |
34 | - protected function _set_menu_map() |
|
35 | - { |
|
36 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
37 | - array( |
|
38 | - 'menu_group' => 'extras', |
|
39 | - 'menu_order' => 40, |
|
40 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN, |
|
41 | - 'parent_slug' => 'espresso_events', |
|
42 | - 'menu_slug' => 'espresso_about', |
|
43 | - 'menu_label' => EE_ABOUT_LABEL, |
|
44 | - 'capability' => 'manage_options', |
|
45 | - 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
46 | - 'admin_init_page' => $this, |
|
47 | - ) |
|
48 | - ); |
|
49 | - } |
|
34 | + protected function _set_menu_map() |
|
35 | + { |
|
36 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
37 | + array( |
|
38 | + 'menu_group' => 'extras', |
|
39 | + 'menu_order' => 40, |
|
40 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN, |
|
41 | + 'parent_slug' => 'espresso_events', |
|
42 | + 'menu_slug' => 'espresso_about', |
|
43 | + 'menu_label' => EE_ABOUT_LABEL, |
|
44 | + 'capability' => 'manage_options', |
|
45 | + 'maintenance_mode_parent' => 'espresso_maintenance_settings', |
|
46 | + 'admin_init_page' => $this, |
|
47 | + ) |
|
48 | + ); |
|
49 | + } |
|
50 | 50 | } |
@@ -19,10 +19,10 @@ |
||
19 | 19 | // define some events related constants |
20 | 20 | define('EE_ABOUT_PG_SLUG', 'espresso_about'); |
21 | 21 | define('EE_ABOUT_LABEL', __('About', 'event_espresso')); |
22 | - define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES . 'about/'); |
|
23 | - define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page=' . EE_ABOUT_PG_SLUG)); |
|
24 | - define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN . 'templates/'); |
|
25 | - define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'about/assets/'); |
|
22 | + define('EE_ABOUT_ADMIN', EE_ADMIN_PAGES.'about/'); |
|
23 | + define('EE_ABOUT_ADMIN_URL', admin_url('admin.php?page='.EE_ABOUT_PG_SLUG)); |
|
24 | + define('EE_ABOUT_TEMPLATE_PATH', EE_ABOUT_ADMIN.'templates/'); |
|
25 | + define('EE_ABOUT_ASSETS_URL', EE_ADMIN_PAGES_URL.'about/assets/'); |
|
26 | 26 | parent::__construct(); |
27 | 27 | } |
28 | 28 |