@@ -4,14 +4,14 @@ |
||
4 | 4 | <h4><?php esc_html_e('New to Event Espresso?', 'event_espresso'); ?></h4> |
5 | 5 | |
6 | 6 | <p><?php |
7 | - printf( |
|
8 | - esc_html__( |
|
9 | - 'Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.', |
|
10 | - 'event_espresso' |
|
11 | - ), |
|
12 | - '<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">', |
|
13 | - '</a>', |
|
14 | - '<em>', |
|
15 | - '</em>' |
|
16 | - ); ?></p> |
|
7 | + printf( |
|
8 | + esc_html__( |
|
9 | + 'Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.', |
|
10 | + 'event_espresso' |
|
11 | + ), |
|
12 | + '<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">', |
|
13 | + '</a>', |
|
14 | + '<em>', |
|
15 | + '</em>' |
|
16 | + ); ?></p> |
|
17 | 17 | </div> |
18 | 18 | \ No newline at end of file |
@@ -18,189 +18,189 @@ |
||
18 | 18 | { |
19 | 19 | |
20 | 20 | |
21 | - public function __construct($routing = true) |
|
22 | - { |
|
23 | - parent::__construct($routing); |
|
24 | - define('EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'about/templates/'); |
|
25 | - } |
|
26 | - |
|
27 | - |
|
28 | - protected function _extend_page_config() |
|
29 | - { |
|
30 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'about'; |
|
31 | - } |
|
32 | - |
|
33 | - protected function _set_page_routes() |
|
34 | - { |
|
35 | - $this->_page_routes = array( |
|
36 | - 'default' => array( |
|
37 | - 'func' => '_whats_new', |
|
38 | - 'capability' => 'manage_options', |
|
39 | - ), |
|
40 | - 'overview' => array( |
|
41 | - 'func' => '_overview', |
|
42 | - 'capability' => 'manage_options', |
|
43 | - ), |
|
44 | - 'credits' => array( |
|
45 | - 'func' => '_credits', |
|
46 | - 'capability' => 'manage_options', |
|
47 | - ), |
|
48 | - /*'decafvpro' => array( |
|
21 | + public function __construct($routing = true) |
|
22 | + { |
|
23 | + parent::__construct($routing); |
|
24 | + define('EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'about/templates/'); |
|
25 | + } |
|
26 | + |
|
27 | + |
|
28 | + protected function _extend_page_config() |
|
29 | + { |
|
30 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'about'; |
|
31 | + } |
|
32 | + |
|
33 | + protected function _set_page_routes() |
|
34 | + { |
|
35 | + $this->_page_routes = array( |
|
36 | + 'default' => array( |
|
37 | + 'func' => '_whats_new', |
|
38 | + 'capability' => 'manage_options', |
|
39 | + ), |
|
40 | + 'overview' => array( |
|
41 | + 'func' => '_overview', |
|
42 | + 'capability' => 'manage_options', |
|
43 | + ), |
|
44 | + 'credits' => array( |
|
45 | + 'func' => '_credits', |
|
46 | + 'capability' => 'manage_options', |
|
47 | + ), |
|
48 | + /*'decafvpro' => array( |
|
49 | 49 | 'func' => '_decafvpro', |
50 | 50 | 'capability' => 'manage_options' |
51 | 51 | ),*/ |
52 | - 'reviews' => array( |
|
53 | - 'func' => '_reviews', |
|
54 | - 'capability' => 'manage_options', |
|
55 | - ), |
|
56 | - |
|
57 | - |
|
58 | - ); |
|
59 | - } |
|
60 | - |
|
61 | - |
|
62 | - protected function _set_page_config() |
|
63 | - { |
|
64 | - $this->_page_config = array( |
|
65 | - 'default' => array( |
|
66 | - 'nav' => array( |
|
67 | - 'label' => __('What\'s New', 'event_espresso'), |
|
68 | - 'order' => 10, |
|
69 | - ), |
|
70 | - 'require_nonce' => false, |
|
71 | - ), |
|
72 | - 'overview' => array( |
|
73 | - 'nav' => array( |
|
74 | - 'label' => __('About', 'event_espresso'), |
|
75 | - 'order' => 20, |
|
76 | - ), |
|
77 | - 'require_nonce' => false, |
|
78 | - ), |
|
79 | - 'credits' => array( |
|
80 | - 'nav' => array( |
|
81 | - 'label' => __('Credits', 'event_espresso'), |
|
82 | - 'order' => 30, |
|
83 | - ), |
|
84 | - 'require_nonce' => false, |
|
85 | - ), |
|
86 | - /*'decafvpro' => array( |
|
52 | + 'reviews' => array( |
|
53 | + 'func' => '_reviews', |
|
54 | + 'capability' => 'manage_options', |
|
55 | + ), |
|
56 | + |
|
57 | + |
|
58 | + ); |
|
59 | + } |
|
60 | + |
|
61 | + |
|
62 | + protected function _set_page_config() |
|
63 | + { |
|
64 | + $this->_page_config = array( |
|
65 | + 'default' => array( |
|
66 | + 'nav' => array( |
|
67 | + 'label' => __('What\'s New', 'event_espresso'), |
|
68 | + 'order' => 10, |
|
69 | + ), |
|
70 | + 'require_nonce' => false, |
|
71 | + ), |
|
72 | + 'overview' => array( |
|
73 | + 'nav' => array( |
|
74 | + 'label' => __('About', 'event_espresso'), |
|
75 | + 'order' => 20, |
|
76 | + ), |
|
77 | + 'require_nonce' => false, |
|
78 | + ), |
|
79 | + 'credits' => array( |
|
80 | + 'nav' => array( |
|
81 | + 'label' => __('Credits', 'event_espresso'), |
|
82 | + 'order' => 30, |
|
83 | + ), |
|
84 | + 'require_nonce' => false, |
|
85 | + ), |
|
86 | + /*'decafvpro' => array( |
|
87 | 87 | 'nav' => array( |
88 | 88 | 'label' => esc_html__('Decaf vs Regular', 'event_espresso'), |
89 | 89 | 'order' => 40), |
90 | 90 | 'require_nonce' => FALSE |
91 | 91 | ),*/ |
92 | - 'reviews' => array( |
|
93 | - 'nav' => array( |
|
94 | - 'label' => esc_html__('Reviews', 'event_espresso'), |
|
95 | - 'order' => 50, |
|
96 | - ), |
|
97 | - 'require_nonce' => false, |
|
98 | - ), |
|
99 | - |
|
100 | - ); |
|
101 | - } |
|
102 | - |
|
103 | - |
|
104 | - protected function _whats_new() |
|
105 | - { |
|
106 | - $steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance |
|
107 | - ? $this->_get_started_steps() : false; |
|
108 | - $steps = $steps !== false ? $steps : ''; |
|
109 | - $this->_admin_page_title = sprintf( |
|
110 | - __('Welcome to Event Espresso %s', 'event_espresso'), |
|
111 | - EVENT_ESPRESSO_VERSION |
|
112 | - ); |
|
113 | - $settings_message = $steps; |
|
114 | - $this->_template_args['admin_page_subtitle'] = __( |
|
115 | - 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
|
116 | - 'event_espresso' |
|
117 | - ) . $settings_message; |
|
118 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php') |
|
119 | - ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH . 'whats_new.template.php'; |
|
120 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
121 | - $template, |
|
122 | - $this->_template_args, |
|
123 | - true |
|
124 | - ); |
|
125 | - $this->display_about_admin_page(); |
|
126 | - } |
|
127 | - |
|
128 | - |
|
129 | - protected function _overview() |
|
130 | - { |
|
131 | - $this->_admin_page_title = __('About Event Espresso', 'event_espresso'); |
|
132 | - $this->_template_args['admin_page_subtitle'] = __( |
|
133 | - 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
|
134 | - 'event_espresso' |
|
135 | - ); |
|
136 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php') |
|
137 | - ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' |
|
138 | - : EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php'; |
|
139 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
140 | - $template, |
|
141 | - $this->_template_args, |
|
142 | - true |
|
143 | - ); |
|
144 | - $this->display_about_admin_page(); |
|
145 | - } |
|
146 | - |
|
147 | - protected function _credits() |
|
148 | - { |
|
149 | - // $this->_template_args['admin_page_title'] = sprintf( |
|
150 | - // __('Welcome to Event Espresso %s', 'event_espresso'), |
|
151 | - // EVENT_ESPRESSO_VERSION |
|
152 | - // ); |
|
153 | - $this->_template_args['admin_page_subtitle'] = __( |
|
154 | - 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
|
155 | - 'event_espresso' |
|
156 | - ); |
|
157 | - $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php'; |
|
158 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
159 | - $template, |
|
160 | - $this->_template_args, |
|
161 | - true |
|
162 | - ); |
|
163 | - $this->display_about_admin_page(); |
|
164 | - } |
|
165 | - |
|
166 | - protected function _decafvpro() |
|
167 | - { |
|
168 | - $this->_template_args['admin_page_title'] = sprintf( |
|
169 | - __('Welcome to Event Espresso %s', 'event_espresso'), |
|
170 | - EVENT_ESPRESSO_VERSION |
|
171 | - ); |
|
172 | - $this->_template_args['admin_page_subtitle'] = sprintf( |
|
173 | - __( |
|
174 | - 'Event Espresso lets you focus on doing %swhat you love%s — %sorganizing your events%s', |
|
175 | - 'event_espresso' |
|
176 | - ), |
|
177 | - '<em>', |
|
178 | - '</em>', |
|
179 | - '<strong>', |
|
180 | - '</strong>' |
|
181 | - ); |
|
182 | - $template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php'; |
|
183 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
184 | - $template, |
|
185 | - $this->_template_args, |
|
186 | - true |
|
187 | - ); |
|
188 | - $this->display_about_admin_page(); |
|
189 | - } |
|
190 | - |
|
191 | - protected function _reviews() |
|
192 | - { |
|
193 | - $this->_template_args['admin_page_title'] = __('Rave Reviews About Event Espresso 4', 'event_espresso'); |
|
194 | - $this->_template_args['admin_page_subtitle'] = __( |
|
195 | - 'At Event Espresso, customer satisfaction is our ultimate goal.', |
|
196 | - 'event_espresso' |
|
197 | - ); |
|
198 | - $template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php'; |
|
199 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
200 | - $template, |
|
201 | - $this->_template_args, |
|
202 | - true |
|
203 | - ); |
|
204 | - $this->display_about_admin_page(); |
|
205 | - } |
|
92 | + 'reviews' => array( |
|
93 | + 'nav' => array( |
|
94 | + 'label' => esc_html__('Reviews', 'event_espresso'), |
|
95 | + 'order' => 50, |
|
96 | + ), |
|
97 | + 'require_nonce' => false, |
|
98 | + ), |
|
99 | + |
|
100 | + ); |
|
101 | + } |
|
102 | + |
|
103 | + |
|
104 | + protected function _whats_new() |
|
105 | + { |
|
106 | + $steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance |
|
107 | + ? $this->_get_started_steps() : false; |
|
108 | + $steps = $steps !== false ? $steps : ''; |
|
109 | + $this->_admin_page_title = sprintf( |
|
110 | + __('Welcome to Event Espresso %s', 'event_espresso'), |
|
111 | + EVENT_ESPRESSO_VERSION |
|
112 | + ); |
|
113 | + $settings_message = $steps; |
|
114 | + $this->_template_args['admin_page_subtitle'] = __( |
|
115 | + 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
|
116 | + 'event_espresso' |
|
117 | + ) . $settings_message; |
|
118 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php') |
|
119 | + ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH . 'whats_new.template.php'; |
|
120 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
121 | + $template, |
|
122 | + $this->_template_args, |
|
123 | + true |
|
124 | + ); |
|
125 | + $this->display_about_admin_page(); |
|
126 | + } |
|
127 | + |
|
128 | + |
|
129 | + protected function _overview() |
|
130 | + { |
|
131 | + $this->_admin_page_title = __('About Event Espresso', 'event_espresso'); |
|
132 | + $this->_template_args['admin_page_subtitle'] = __( |
|
133 | + 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
|
134 | + 'event_espresso' |
|
135 | + ); |
|
136 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php') |
|
137 | + ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' |
|
138 | + : EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php'; |
|
139 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
140 | + $template, |
|
141 | + $this->_template_args, |
|
142 | + true |
|
143 | + ); |
|
144 | + $this->display_about_admin_page(); |
|
145 | + } |
|
146 | + |
|
147 | + protected function _credits() |
|
148 | + { |
|
149 | + // $this->_template_args['admin_page_title'] = sprintf( |
|
150 | + // __('Welcome to Event Espresso %s', 'event_espresso'), |
|
151 | + // EVENT_ESPRESSO_VERSION |
|
152 | + // ); |
|
153 | + $this->_template_args['admin_page_subtitle'] = __( |
|
154 | + 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
|
155 | + 'event_espresso' |
|
156 | + ); |
|
157 | + $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php'; |
|
158 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
159 | + $template, |
|
160 | + $this->_template_args, |
|
161 | + true |
|
162 | + ); |
|
163 | + $this->display_about_admin_page(); |
|
164 | + } |
|
165 | + |
|
166 | + protected function _decafvpro() |
|
167 | + { |
|
168 | + $this->_template_args['admin_page_title'] = sprintf( |
|
169 | + __('Welcome to Event Espresso %s', 'event_espresso'), |
|
170 | + EVENT_ESPRESSO_VERSION |
|
171 | + ); |
|
172 | + $this->_template_args['admin_page_subtitle'] = sprintf( |
|
173 | + __( |
|
174 | + 'Event Espresso lets you focus on doing %swhat you love%s — %sorganizing your events%s', |
|
175 | + 'event_espresso' |
|
176 | + ), |
|
177 | + '<em>', |
|
178 | + '</em>', |
|
179 | + '<strong>', |
|
180 | + '</strong>' |
|
181 | + ); |
|
182 | + $template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php'; |
|
183 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
184 | + $template, |
|
185 | + $this->_template_args, |
|
186 | + true |
|
187 | + ); |
|
188 | + $this->display_about_admin_page(); |
|
189 | + } |
|
190 | + |
|
191 | + protected function _reviews() |
|
192 | + { |
|
193 | + $this->_template_args['admin_page_title'] = __('Rave Reviews About Event Espresso 4', 'event_espresso'); |
|
194 | + $this->_template_args['admin_page_subtitle'] = __( |
|
195 | + 'At Event Espresso, customer satisfaction is our ultimate goal.', |
|
196 | + 'event_espresso' |
|
197 | + ); |
|
198 | + $template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php'; |
|
199 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
|
200 | + $template, |
|
201 | + $this->_template_args, |
|
202 | + true |
|
203 | + ); |
|
204 | + $this->display_about_admin_page(); |
|
205 | + } |
|
206 | 206 | } |
@@ -21,13 +21,13 @@ discard block |
||
21 | 21 | public function __construct($routing = true) |
22 | 22 | { |
23 | 23 | parent::__construct($routing); |
24 | - define('EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'about/templates/'); |
|
24 | + define('EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'about/templates/'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | protected function _extend_page_config() |
29 | 29 | { |
30 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'about'; |
|
30 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'about'; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | protected function _set_page_routes() |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | $this->_template_args['admin_page_subtitle'] = __( |
115 | 115 | 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
116 | 116 | 'event_espresso' |
117 | - ) . $settings_message; |
|
118 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php') |
|
119 | - ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH . 'whats_new.template.php'; |
|
117 | + ).$settings_message; |
|
118 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'whats_new.template.php') |
|
119 | + ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH.'whats_new.template.php'; |
|
120 | 120 | $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
121 | 121 | $template, |
122 | 122 | $this->_template_args, |
@@ -133,9 +133,9 @@ discard block |
||
133 | 133 | 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
134 | 134 | 'event_espresso' |
135 | 135 | ); |
136 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php') |
|
136 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'ee4-overview.template.php') |
|
137 | 137 | ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' |
138 | - : EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php'; |
|
138 | + : EE_ABOUT_TEMPLATE_PATH.'ee4-overview.template.php'; |
|
139 | 139 | $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
140 | 140 | $template, |
141 | 141 | $this->_template_args, |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', |
155 | 155 | 'event_espresso' |
156 | 156 | ); |
157 | - $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php'; |
|
157 | + $template = EE_ABOUT_TEMPLATE_PATH.'credits.template.php'; |
|
158 | 158 | $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
159 | 159 | $template, |
160 | 160 | $this->_template_args, |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | '<strong>', |
180 | 180 | '</strong>' |
181 | 181 | ); |
182 | - $template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php'; |
|
182 | + $template = EE_ABOUT_TEMPLATE_PATH.'decafvpro.template.php'; |
|
183 | 183 | $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
184 | 184 | $template, |
185 | 185 | $this->_template_args, |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | 'At Event Espresso, customer satisfaction is our ultimate goal.', |
196 | 196 | 'event_espresso' |
197 | 197 | ); |
198 | - $template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php'; |
|
198 | + $template = EE_ABOUT_TEMPLATE_PATH.'reviews.template.php'; |
|
199 | 199 | $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( |
200 | 200 | $template, |
201 | 201 | $this->_template_args, |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | public function __construct($routing = true) |
22 | 22 | { |
23 | 23 | parent::__construct($routing); |
24 | - if (! defined('EE_MSG_CAF_ASSETS_PATH')) { |
|
25 | - define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/'); |
|
26 | - define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/'); |
|
27 | - define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/'); |
|
28 | - define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/'); |
|
24 | + if ( ! defined('EE_MSG_CAF_ASSETS_PATH')) { |
|
25 | + define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/assets/'); |
|
26 | + define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/assets/'); |
|
27 | + define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/templates/'); |
|
28 | + define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/templates/'); |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | 32 | protected function _extend_page_config() |
33 | 33 | { |
34 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages'; |
|
34 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'messages'; |
|
35 | 35 | $this->_page_routes['custom_mtps'] = array( |
36 | 36 | 'func' => '_ee_custom_messages_overview_list_table', |
37 | 37 | 'capability' => 'ee_read_messages', |
@@ -76,13 +76,13 @@ discard block |
||
76 | 76 | { |
77 | 77 | global $admin_page_hooks; |
78 | 78 | |
79 | - if (! empty($admin_page_hooks['espresso_events'])) { |
|
79 | + if ( ! empty($admin_page_hooks['espresso_events'])) { |
|
80 | 80 | // we're on a EE specific page... good stuff! |
81 | 81 | $hook_prefix = $admin_page_hooks['espresso_events']; |
82 | - $filter_ref = $hook_prefix . '_page_' . $this->page_slug; |
|
83 | - add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2); |
|
82 | + $filter_ref = $hook_prefix.'_page_'.$this->page_slug; |
|
83 | + add_filter('FHEE_manage_'.$filter_ref.'_columns', array($this, 'add_custom_mtps_columns'), 10, 2); |
|
84 | 84 | add_action( |
85 | - 'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref, |
|
85 | + 'AHEE__EE_Admin_List_Table__column_actions__'.$filter_ref, |
|
86 | 86 | array($this, 'custom_mtp_create_button_column'), |
87 | 87 | 10, |
88 | 88 | 2 |
@@ -18,191 +18,191 @@ |
||
18 | 18 | { |
19 | 19 | |
20 | 20 | |
21 | - public function __construct($routing = true) |
|
22 | - { |
|
23 | - parent::__construct($routing); |
|
24 | - if (! defined('EE_MSG_CAF_ASSETS_PATH')) { |
|
25 | - define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/'); |
|
26 | - define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/'); |
|
27 | - define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/'); |
|
28 | - define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/'); |
|
29 | - } |
|
30 | - } |
|
31 | - |
|
32 | - protected function _extend_page_config() |
|
33 | - { |
|
34 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages'; |
|
35 | - $this->_page_routes['custom_mtps'] = array( |
|
36 | - 'func' => '_ee_custom_messages_overview_list_table', |
|
37 | - 'capability' => 'ee_read_messages', |
|
38 | - ); |
|
39 | - $this->_page_config['custom_mtps'] = array( |
|
40 | - 'nav' => array( |
|
41 | - 'label' => __('Custom Message Templates', 'event_espresso'), |
|
42 | - 'order' => 30, |
|
43 | - ), |
|
44 | - 'list_table' => 'Custom_Messages_Template_List_Table', |
|
45 | - 'help_tabs' => array( |
|
46 | - 'message_overview_message_types_help_tab' => array( |
|
47 | - 'title' => __('Message Types', 'event_espresso'), |
|
48 | - 'filename' => 'messages_overview_types', |
|
49 | - ), |
|
50 | - 'messages_overview_messengers_help_tab' => array( |
|
51 | - 'title' => __('Messengers', 'event_espresso'), |
|
52 | - 'filename' => 'messages_overview_messengers', |
|
53 | - ), |
|
54 | - 'messages_overview_other_help_tab' => array( |
|
55 | - 'title' => __('Messages Other', 'event_espresso'), |
|
56 | - 'filename' => 'messages_overview_other', |
|
57 | - ), |
|
58 | - ), |
|
59 | - 'help_tour' => array(), |
|
60 | - 'require_nonce' => false, |
|
61 | - ); |
|
62 | - |
|
63 | - add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10); |
|
64 | - } |
|
65 | - |
|
66 | - |
|
67 | - /** |
|
68 | - * Callback for current_screen action |
|
69 | - * This is used for any filters and/or actions that require the dynamic screen hook_prefix to be correct. |
|
70 | - * |
|
71 | - * @since 4.5.0 |
|
72 | - * |
|
73 | - * @return void |
|
74 | - */ |
|
75 | - public function dynamic_screen_hooks() |
|
76 | - { |
|
77 | - global $admin_page_hooks; |
|
78 | - |
|
79 | - if (! empty($admin_page_hooks['espresso_events'])) { |
|
80 | - // we're on a EE specific page... good stuff! |
|
81 | - $hook_prefix = $admin_page_hooks['espresso_events']; |
|
82 | - $filter_ref = $hook_prefix . '_page_' . $this->page_slug; |
|
83 | - add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2); |
|
84 | - add_action( |
|
85 | - 'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref, |
|
86 | - array($this, 'custom_mtp_create_button_column'), |
|
87 | - 10, |
|
88 | - 2 |
|
89 | - ); |
|
90 | - } |
|
91 | - } |
|
92 | - |
|
93 | - |
|
94 | - /** |
|
95 | - * This is the callback for the FHEE__manage_event-espresso_page_espresso_messages_columns to register the |
|
96 | - * caffeinated columns for the global message templates list table. |
|
97 | - * |
|
98 | - * @since 4.3.2 |
|
99 | - * |
|
100 | - * @param array $columns Original defined list of columns |
|
101 | - * @param string $screen_id The unique screen id for the page. |
|
102 | - */ |
|
103 | - public function add_custom_mtps_columns($columns, $screen_id) |
|
104 | - { |
|
105 | - if ($screen_id !== 'espresso_messages_global_mtps') { |
|
106 | - return $columns; |
|
107 | - } |
|
108 | - |
|
109 | - $columns['actions'] = ''; |
|
110 | - return $columns; |
|
111 | - } |
|
112 | - |
|
113 | - |
|
114 | - /** |
|
115 | - * Callback for FHEE__EE_Admin_List_Table__column_actions__event-espresso_page_espresso_messages action that allows |
|
116 | - * for adding the content for the registered "action" column. |
|
117 | - * |
|
118 | - * @since 4.3.2 |
|
119 | - * |
|
120 | - * @param EE_Base_Class |
|
121 | - * @param string $screen_id Unique screen id for the page |
|
122 | - * |
|
123 | - * @return string html content for the page. |
|
124 | - */ |
|
125 | - public function custom_mtp_create_button_column($item, $screen_id) |
|
126 | - { |
|
127 | - if ( |
|
128 | - $screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can( |
|
129 | - 'ee_edit_messages', |
|
130 | - 'espresso_messages_add_new_message_template' |
|
131 | - ) |
|
132 | - ) { |
|
133 | - return ''; |
|
134 | - } |
|
135 | - |
|
136 | - // first we consider whether this template has override set. If it does then that means no custom templates can be created from this template as a base. So let's just skip the button creation. |
|
137 | - if ($item->get('MTP_is_override')) { |
|
138 | - return ''; |
|
139 | - } |
|
140 | - |
|
141 | - |
|
142 | - $create_args = array( |
|
143 | - 'GRP_ID' => $item->ID(), |
|
144 | - 'messenger' => $item->messenger(), |
|
145 | - 'message_type' => $item->message_type(), |
|
146 | - 'action' => 'add_new_message_template', |
|
147 | - ); |
|
148 | - $create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL); |
|
149 | - echo sprintf( |
|
150 | - '<a href="%s" class="button button-small">%s</a>', |
|
151 | - $create_link, |
|
152 | - __('Create Custom', 'event_espresso') |
|
153 | - ); |
|
154 | - } |
|
155 | - |
|
156 | - |
|
157 | - protected function _add_screen_options_custom_mtps() |
|
158 | - { |
|
159 | - $page_title = $this->_admin_page_title; |
|
160 | - $this->_admin_page_title = __('Custom Message Templates', 'event_espresso'); |
|
161 | - $this->_per_page_screen_option(); |
|
162 | - $this->_admin_page_title = $page_title; |
|
163 | - } |
|
164 | - |
|
165 | - |
|
166 | - /** |
|
167 | - * set views array for Custom Templates list table |
|
168 | - * |
|
169 | - * @access public |
|
170 | - * @return void |
|
171 | - */ |
|
172 | - public function _set_list_table_views_custom_mtps() |
|
173 | - { |
|
174 | - $this->_views = array( |
|
175 | - 'in_use' => array( |
|
176 | - 'slug' => 'in_use', |
|
177 | - 'label' => __('In Use', 'event_espresso'), |
|
178 | - 'count' => 0, |
|
179 | - 'bulk_action' => array( |
|
180 | - 'trash_message_template' => __('Move to Trash', 'event_espresso'), |
|
181 | - ), |
|
182 | - ), |
|
183 | - ); |
|
184 | - if ( |
|
185 | - EE_Registry::instance()->CAP->current_user_can( |
|
186 | - 'ee_delete_messages', |
|
187 | - 'espresso_messages_trash_message_template' |
|
188 | - ) |
|
189 | - ) { |
|
190 | - $this->_views['trashed'] = array( |
|
191 | - 'slug' => 'trashed', |
|
192 | - 'label' => __('Trash', 'event_espresso'), |
|
193 | - 'count' => 0, |
|
194 | - 'bulk_action' => array( |
|
195 | - 'restore_message_template' => __('Restore From Trash', 'event_espresso'), |
|
196 | - 'delete_message_template' => __('Delete Permanently', 'event_espresso'), |
|
197 | - ), |
|
198 | - ); |
|
199 | - } |
|
200 | - } |
|
201 | - |
|
202 | - |
|
203 | - protected function _ee_custom_messages_overview_list_table() |
|
204 | - { |
|
205 | - $this->_admin_page_title = __('Custom Message Templates', 'event_espresso'); |
|
206 | - $this->display_admin_list_table_page_with_no_sidebar(); |
|
207 | - } |
|
21 | + public function __construct($routing = true) |
|
22 | + { |
|
23 | + parent::__construct($routing); |
|
24 | + if (! defined('EE_MSG_CAF_ASSETS_PATH')) { |
|
25 | + define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/'); |
|
26 | + define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/'); |
|
27 | + define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/'); |
|
28 | + define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/'); |
|
29 | + } |
|
30 | + } |
|
31 | + |
|
32 | + protected function _extend_page_config() |
|
33 | + { |
|
34 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages'; |
|
35 | + $this->_page_routes['custom_mtps'] = array( |
|
36 | + 'func' => '_ee_custom_messages_overview_list_table', |
|
37 | + 'capability' => 'ee_read_messages', |
|
38 | + ); |
|
39 | + $this->_page_config['custom_mtps'] = array( |
|
40 | + 'nav' => array( |
|
41 | + 'label' => __('Custom Message Templates', 'event_espresso'), |
|
42 | + 'order' => 30, |
|
43 | + ), |
|
44 | + 'list_table' => 'Custom_Messages_Template_List_Table', |
|
45 | + 'help_tabs' => array( |
|
46 | + 'message_overview_message_types_help_tab' => array( |
|
47 | + 'title' => __('Message Types', 'event_espresso'), |
|
48 | + 'filename' => 'messages_overview_types', |
|
49 | + ), |
|
50 | + 'messages_overview_messengers_help_tab' => array( |
|
51 | + 'title' => __('Messengers', 'event_espresso'), |
|
52 | + 'filename' => 'messages_overview_messengers', |
|
53 | + ), |
|
54 | + 'messages_overview_other_help_tab' => array( |
|
55 | + 'title' => __('Messages Other', 'event_espresso'), |
|
56 | + 'filename' => 'messages_overview_other', |
|
57 | + ), |
|
58 | + ), |
|
59 | + 'help_tour' => array(), |
|
60 | + 'require_nonce' => false, |
|
61 | + ); |
|
62 | + |
|
63 | + add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10); |
|
64 | + } |
|
65 | + |
|
66 | + |
|
67 | + /** |
|
68 | + * Callback for current_screen action |
|
69 | + * This is used for any filters and/or actions that require the dynamic screen hook_prefix to be correct. |
|
70 | + * |
|
71 | + * @since 4.5.0 |
|
72 | + * |
|
73 | + * @return void |
|
74 | + */ |
|
75 | + public function dynamic_screen_hooks() |
|
76 | + { |
|
77 | + global $admin_page_hooks; |
|
78 | + |
|
79 | + if (! empty($admin_page_hooks['espresso_events'])) { |
|
80 | + // we're on a EE specific page... good stuff! |
|
81 | + $hook_prefix = $admin_page_hooks['espresso_events']; |
|
82 | + $filter_ref = $hook_prefix . '_page_' . $this->page_slug; |
|
83 | + add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2); |
|
84 | + add_action( |
|
85 | + 'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref, |
|
86 | + array($this, 'custom_mtp_create_button_column'), |
|
87 | + 10, |
|
88 | + 2 |
|
89 | + ); |
|
90 | + } |
|
91 | + } |
|
92 | + |
|
93 | + |
|
94 | + /** |
|
95 | + * This is the callback for the FHEE__manage_event-espresso_page_espresso_messages_columns to register the |
|
96 | + * caffeinated columns for the global message templates list table. |
|
97 | + * |
|
98 | + * @since 4.3.2 |
|
99 | + * |
|
100 | + * @param array $columns Original defined list of columns |
|
101 | + * @param string $screen_id The unique screen id for the page. |
|
102 | + */ |
|
103 | + public function add_custom_mtps_columns($columns, $screen_id) |
|
104 | + { |
|
105 | + if ($screen_id !== 'espresso_messages_global_mtps') { |
|
106 | + return $columns; |
|
107 | + } |
|
108 | + |
|
109 | + $columns['actions'] = ''; |
|
110 | + return $columns; |
|
111 | + } |
|
112 | + |
|
113 | + |
|
114 | + /** |
|
115 | + * Callback for FHEE__EE_Admin_List_Table__column_actions__event-espresso_page_espresso_messages action that allows |
|
116 | + * for adding the content for the registered "action" column. |
|
117 | + * |
|
118 | + * @since 4.3.2 |
|
119 | + * |
|
120 | + * @param EE_Base_Class |
|
121 | + * @param string $screen_id Unique screen id for the page |
|
122 | + * |
|
123 | + * @return string html content for the page. |
|
124 | + */ |
|
125 | + public function custom_mtp_create_button_column($item, $screen_id) |
|
126 | + { |
|
127 | + if ( |
|
128 | + $screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can( |
|
129 | + 'ee_edit_messages', |
|
130 | + 'espresso_messages_add_new_message_template' |
|
131 | + ) |
|
132 | + ) { |
|
133 | + return ''; |
|
134 | + } |
|
135 | + |
|
136 | + // first we consider whether this template has override set. If it does then that means no custom templates can be created from this template as a base. So let's just skip the button creation. |
|
137 | + if ($item->get('MTP_is_override')) { |
|
138 | + return ''; |
|
139 | + } |
|
140 | + |
|
141 | + |
|
142 | + $create_args = array( |
|
143 | + 'GRP_ID' => $item->ID(), |
|
144 | + 'messenger' => $item->messenger(), |
|
145 | + 'message_type' => $item->message_type(), |
|
146 | + 'action' => 'add_new_message_template', |
|
147 | + ); |
|
148 | + $create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL); |
|
149 | + echo sprintf( |
|
150 | + '<a href="%s" class="button button-small">%s</a>', |
|
151 | + $create_link, |
|
152 | + __('Create Custom', 'event_espresso') |
|
153 | + ); |
|
154 | + } |
|
155 | + |
|
156 | + |
|
157 | + protected function _add_screen_options_custom_mtps() |
|
158 | + { |
|
159 | + $page_title = $this->_admin_page_title; |
|
160 | + $this->_admin_page_title = __('Custom Message Templates', 'event_espresso'); |
|
161 | + $this->_per_page_screen_option(); |
|
162 | + $this->_admin_page_title = $page_title; |
|
163 | + } |
|
164 | + |
|
165 | + |
|
166 | + /** |
|
167 | + * set views array for Custom Templates list table |
|
168 | + * |
|
169 | + * @access public |
|
170 | + * @return void |
|
171 | + */ |
|
172 | + public function _set_list_table_views_custom_mtps() |
|
173 | + { |
|
174 | + $this->_views = array( |
|
175 | + 'in_use' => array( |
|
176 | + 'slug' => 'in_use', |
|
177 | + 'label' => __('In Use', 'event_espresso'), |
|
178 | + 'count' => 0, |
|
179 | + 'bulk_action' => array( |
|
180 | + 'trash_message_template' => __('Move to Trash', 'event_espresso'), |
|
181 | + ), |
|
182 | + ), |
|
183 | + ); |
|
184 | + if ( |
|
185 | + EE_Registry::instance()->CAP->current_user_can( |
|
186 | + 'ee_delete_messages', |
|
187 | + 'espresso_messages_trash_message_template' |
|
188 | + ) |
|
189 | + ) { |
|
190 | + $this->_views['trashed'] = array( |
|
191 | + 'slug' => 'trashed', |
|
192 | + 'label' => __('Trash', 'event_espresso'), |
|
193 | + 'count' => 0, |
|
194 | + 'bulk_action' => array( |
|
195 | + 'restore_message_template' => __('Restore From Trash', 'event_espresso'), |
|
196 | + 'delete_message_template' => __('Delete Permanently', 'event_espresso'), |
|
197 | + ), |
|
198 | + ); |
|
199 | + } |
|
200 | + } |
|
201 | + |
|
202 | + |
|
203 | + protected function _ee_custom_messages_overview_list_table() |
|
204 | + { |
|
205 | + $this->_admin_page_title = __('Custom Message Templates', 'event_espresso'); |
|
206 | + $this->display_admin_list_table_page_with_no_sidebar(); |
|
207 | + } |
|
208 | 208 | } |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | <p> |
20 | 20 | <label for="custom-message-template-name"> |
21 | 21 | <?php _e( |
22 | - 'Name for Template:', |
|
23 | - 'event_espresso' |
|
24 | - ); ?></label><br/> |
|
22 | + 'Name for Template:', |
|
23 | + 'event_espresso' |
|
24 | + ); ?></label><br/> |
|
25 | 25 | <input id="custom-message-template-name" type="text" class="regular-text" |
26 | 26 | name="custom_template_args[MTP_name]" value=""> |
27 | 27 | </p> |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | value="<?php _e('Create Template', 'event_espresso'); ?>"> |
38 | 38 | <button type="button" class="button button-secondary cancel-create-template"> |
39 | 39 | <?php _e( |
40 | - 'Cancel', |
|
41 | - 'event_espresso' |
|
42 | - ); ?></button> |
|
40 | + 'Cancel', |
|
41 | + 'event_espresso' |
|
42 | + ); ?></button> |
|
43 | 43 | </div> |
44 | 44 | </form> |
45 | 45 | </div> |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | public function __construct($routing = true) |
22 | 22 | { |
23 | 23 | parent::__construct($routing); |
24 | - define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/'); |
|
24 | + define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'general_settings/templates/'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | protected function _extend_page_config() |
29 | 29 | { |
30 | 30 | |
31 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings'; |
|
31 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'general_settings'; |
|
32 | 32 | |
33 | 33 | // filters and action hooks here |
34 | 34 | add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) |
61 | 61 | && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) |
62 | 62 | ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : ''; |
63 | - $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php'; |
|
63 | + $template = GEN_SET_CAF_TEMPLATE_PATH.'debug_log_settings.template.php'; |
|
64 | 64 | EEH_Template::display_template($template, $template_args); |
65 | 65 | } |
66 | 66 |
@@ -18,68 +18,68 @@ |
||
18 | 18 | { |
19 | 19 | |
20 | 20 | |
21 | - public function __construct($routing = true) |
|
22 | - { |
|
23 | - parent::__construct($routing); |
|
24 | - define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/'); |
|
25 | - } |
|
21 | + public function __construct($routing = true) |
|
22 | + { |
|
23 | + parent::__construct($routing); |
|
24 | + define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/'); |
|
25 | + } |
|
26 | 26 | |
27 | 27 | |
28 | - protected function _extend_page_config() |
|
29 | - { |
|
28 | + protected function _extend_page_config() |
|
29 | + { |
|
30 | 30 | |
31 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings'; |
|
31 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings'; |
|
32 | 32 | |
33 | - // filters and action hooks here |
|
34 | - add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9); |
|
35 | - add_filter( |
|
36 | - 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', |
|
37 | - array($this, 'update_debug_logging_options'), |
|
38 | - 10, |
|
39 | - 1 |
|
40 | - ); |
|
41 | - } |
|
33 | + // filters and action hooks here |
|
34 | + add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9); |
|
35 | + add_filter( |
|
36 | + 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', |
|
37 | + array($this, 'update_debug_logging_options'), |
|
38 | + 10, |
|
39 | + 1 |
|
40 | + ); |
|
41 | + } |
|
42 | 42 | |
43 | 43 | |
44 | 44 | |
45 | - /************* Logging Settings *************/ |
|
45 | + /************* Logging Settings *************/ |
|
46 | 46 | |
47 | - /** |
|
48 | - * debug_logging_options |
|
49 | - * |
|
50 | - * @param array $template_args |
|
51 | - * |
|
52 | - * @return void |
|
53 | - */ |
|
54 | - public function debug_logging_options($template_args = array()) |
|
55 | - { |
|
56 | - $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint( |
|
57 | - EE_Registry::instance()->CFG->admin->use_remote_logging |
|
58 | - ) : false; |
|
59 | - $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) |
|
60 | - && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) |
|
61 | - ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : ''; |
|
62 | - $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php'; |
|
63 | - EEH_Template::display_template($template, $template_args); |
|
64 | - } |
|
47 | + /** |
|
48 | + * debug_logging_options |
|
49 | + * |
|
50 | + * @param array $template_args |
|
51 | + * |
|
52 | + * @return void |
|
53 | + */ |
|
54 | + public function debug_logging_options($template_args = array()) |
|
55 | + { |
|
56 | + $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint( |
|
57 | + EE_Registry::instance()->CFG->admin->use_remote_logging |
|
58 | + ) : false; |
|
59 | + $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) |
|
60 | + && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) |
|
61 | + ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : ''; |
|
62 | + $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php'; |
|
63 | + EEH_Template::display_template($template, $template_args); |
|
64 | + } |
|
65 | 65 | |
66 | 66 | |
67 | - /** |
|
68 | - * update_debug_logging_options |
|
69 | - * |
|
70 | - * @param array $admin_options |
|
71 | - * |
|
72 | - * @return array |
|
73 | - */ |
|
74 | - public function update_debug_logging_options($admin_options = array()) |
|
75 | - { |
|
76 | - $admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint( |
|
77 | - $this->_req_data['use_remote_logging'] |
|
78 | - ) : $admin_options->use_remote_logging; |
|
79 | - $admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw( |
|
80 | - $this->_req_data['remote_logging_url'] |
|
81 | - ) : $admin_options->remote_logging_url; |
|
67 | + /** |
|
68 | + * update_debug_logging_options |
|
69 | + * |
|
70 | + * @param array $admin_options |
|
71 | + * |
|
72 | + * @return array |
|
73 | + */ |
|
74 | + public function update_debug_logging_options($admin_options = array()) |
|
75 | + { |
|
76 | + $admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint( |
|
77 | + $this->_req_data['use_remote_logging'] |
|
78 | + ) : $admin_options->use_remote_logging; |
|
79 | + $admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw( |
|
80 | + $this->_req_data['remote_logging_url'] |
|
81 | + ) : $admin_options->remote_logging_url; |
|
82 | 82 | |
83 | - return $admin_options; |
|
84 | - } |
|
83 | + return $admin_options; |
|
84 | + } |
|
85 | 85 | } |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | <input type="hidden" name="batch_message[id_type]" value="<?php echo $id_type; ?>"> |
35 | 35 | <input id="newsletter-batch-ids" type="hidden" name="batch_message[ids]" value=""> |
36 | 36 | <h3 class="newsletter-send-form-title"><?php |
37 | - printf( |
|
38 | - __('Sending batch message to %s people...', 'event_espresso'), |
|
39 | - '[NUMPEOPLE]' |
|
40 | - ); ?></h3> |
|
37 | + printf( |
|
38 | + __('Sending batch message to %s people...', 'event_espresso'), |
|
39 | + '[NUMPEOPLE]' |
|
40 | + ); ?></h3> |
|
41 | 41 | <label for="batch-message-template-selector"><?php _e('Select Template:', 'event_espresso'); ?></label> |
42 | 42 | <?php echo $template_selector; ?> |
43 | 43 | <div class="batch-message-edit-fields" style="display:none;"> |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | <div id="shortcode-container-subject" |
60 | 60 | class="shortcodes-info-container ee_shortcode_chooser_container" style="display:none"> |
61 | 61 | <p><?php |
62 | - _e( |
|
63 | - 'The following shortcodes can be used in the subject field:', |
|
64 | - 'event_espresso' |
|
65 | - ); ?></p> |
|
62 | + _e( |
|
63 | + 'The following shortcodes can be used in the subject field:', |
|
64 | + 'event_espresso' |
|
65 | + ); ?></p> |
|
66 | 66 | <p><?php echo $shortcodes['Subject']; ?></p> |
67 | 67 | </div> |
68 | 68 | <input type="text" name="batch_message[subject]" id="batch-message-subject" |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | <div id="shortcode-container-content" |
76 | 76 | class="shortcodes-info-container ee_shortcode_chooser_container" style="display:none"> |
77 | 77 | <p><?php |
78 | - _e( |
|
79 | - 'The following shortcodes can be used in the content area:', |
|
80 | - 'event_espresso' |
|
81 | - ); ?></p> |
|
78 | + _e( |
|
79 | + 'The following shortcodes can be used in the content area:', |
|
80 | + 'event_espresso' |
|
81 | + ); ?></p> |
|
82 | 82 | <p><?php echo $shortcodes['[NEWSLETTER_CONTENT]']; ?></p> |
83 | 83 | </div> |
84 | 84 | <textarea name="batch_message[content]" id="batch-message-content" |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | <input type="submit" class="batch-message-submit button button-primary alignright" |
88 | 88 | name="batch-message-submit" value="<?php _e('Send', 'event_espresso'); ?>"> |
89 | 89 | <button class="batch-message-cancel button button-secondary alignright"><?php |
90 | - _e( |
|
91 | - 'Cancel', |
|
92 | - 'event_espresso' |
|
93 | - ); ?></button> |
|
90 | + _e( |
|
91 | + 'Cancel', |
|
92 | + 'event_espresso' |
|
93 | + ); ?></button> |
|
94 | 94 | <div style="clear:both"></div> |
95 | 95 | </div> |
96 | 96 | </form> |
@@ -16,239 +16,239 @@ |
||
16 | 16 | { |
17 | 17 | |
18 | 18 | |
19 | - /** |
|
20 | - * This is used to hold the reports template data which is setup early in the request. |
|
21 | - * |
|
22 | - * @type array |
|
23 | - */ |
|
24 | - protected $_reports_template_data = array(); |
|
25 | - |
|
26 | - /** |
|
27 | - * @Constructor |
|
28 | - * @access public |
|
29 | - * |
|
30 | - * @param bool $routing |
|
31 | - * |
|
32 | - * @return \Extend_Transactions_Admin_Page |
|
33 | - */ |
|
34 | - public function __construct($routing = true) |
|
35 | - { |
|
36 | - parent::__construct($routing); |
|
37 | - define('TXN_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/templates/'); |
|
38 | - define('TXN_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/assets/'); |
|
39 | - define('TXN_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'transactions/assets/'); |
|
40 | - } |
|
41 | - |
|
42 | - |
|
43 | - /** |
|
44 | - * _extend_page_config |
|
45 | - * |
|
46 | - * @access protected |
|
47 | - * @return void |
|
48 | - */ |
|
49 | - protected function _extend_page_config() |
|
50 | - { |
|
51 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'transactions'; |
|
52 | - |
|
53 | - $new_page_routes = array( |
|
54 | - 'reports' => array( |
|
55 | - 'func' => '_transaction_reports', |
|
56 | - 'capability' => 'ee_read_transactions', |
|
57 | - ), |
|
58 | - ); |
|
59 | - |
|
60 | - $this->_page_routes = array_merge($this->_page_routes, $new_page_routes); |
|
61 | - |
|
62 | - $new_page_config = array( |
|
63 | - 'reports' => array( |
|
64 | - 'nav' => array( |
|
65 | - 'label' => __('Reports', 'event_espresso'), |
|
66 | - 'order' => 20, |
|
67 | - ), |
|
68 | - 'help_tabs' => array( |
|
69 | - 'transactions_reports_help_tab' => array( |
|
70 | - 'title' => __('Transaction Reports', 'event_espresso'), |
|
71 | - 'filename' => 'transactions_reports', |
|
72 | - ), |
|
73 | - ), |
|
74 | - /*'help_tour' => array( 'Transaction_Reports_Help_Tour' ),*/ |
|
75 | - 'require_nonce' => false, |
|
76 | - ), |
|
77 | - ); |
|
78 | - $this->_page_config = array_merge($this->_page_config, $new_page_config); |
|
79 | - } |
|
80 | - |
|
81 | - |
|
82 | - /** |
|
83 | - * load_scripts_styles_reports |
|
84 | - * |
|
85 | - * @access public |
|
86 | - * @return void |
|
87 | - */ |
|
88 | - public function load_scripts_styles_reports() |
|
89 | - { |
|
90 | - wp_register_script( |
|
91 | - 'ee-txn-reports-js', |
|
92 | - TXN_CAF_ASSETS_URL . 'ee-transaction-admin-reports.js', |
|
93 | - array('google-charts'), |
|
94 | - EVENT_ESPRESSO_VERSION, |
|
95 | - true |
|
96 | - ); |
|
97 | - wp_enqueue_script('ee-txn-reports-js'); |
|
98 | - $this->_transaction_reports_js_setup(); |
|
99 | - EE_Registry::$i18n_js_strings['currency_format'] = EEH_Money::get_format_for_google_charts(); |
|
100 | - } |
|
101 | - |
|
102 | - |
|
103 | - /** |
|
104 | - * This is called when javascript is being enqueued to setup the various data needed for the reports js. |
|
105 | - * Also $this->{$_reports_template_data} property is set for later usage by the _transaction_reports method. |
|
106 | - */ |
|
107 | - protected function _transaction_reports_js_setup() |
|
108 | - { |
|
109 | - $this->_reports_template_data['admin_reports'][] = $this->_revenue_per_day_report(); |
|
110 | - $this->_reports_template_data['admin_reports'][] = $this->_revenue_per_event_report(); |
|
111 | - } |
|
112 | - |
|
113 | - |
|
114 | - /** |
|
115 | - * _transaction_reports |
|
116 | - * generates Business Reports regarding Transactions |
|
117 | - * |
|
118 | - * @return void |
|
119 | - */ |
|
120 | - protected function _transaction_reports() |
|
121 | - { |
|
122 | - $template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php'; |
|
123 | - $this->_admin_page_title = __('Transactions', 'event_espresso'); |
|
124 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
|
125 | - $template_path, |
|
126 | - $this->_reports_template_data, |
|
127 | - true |
|
128 | - ); |
|
129 | - |
|
130 | - // the final template wrapper |
|
131 | - $this->display_admin_page_with_no_sidebar(); |
|
132 | - } |
|
133 | - |
|
134 | - |
|
135 | - /** |
|
136 | - * _revenue_per_day_report |
|
137 | - * generates Business Report showing Total Revenue per Day. |
|
138 | - * |
|
139 | - * @param string $period The period (acceptable by PHP Datetime constructor) for which the report is generated. |
|
140 | - * |
|
141 | - * @return string |
|
142 | - */ |
|
143 | - private function _revenue_per_day_report($period = '-1 month') |
|
144 | - { |
|
145 | - |
|
146 | - $report_ID = 'txn-admin-revenue-per-day-report-dv'; |
|
147 | - |
|
148 | - $TXN = EEM_Transaction::instance(); |
|
149 | - |
|
150 | - $results = $TXN->get_revenue_per_day_report($period); |
|
151 | - $results = (array) $results; |
|
152 | - $revenue = array(); |
|
153 | - $subtitle = ''; |
|
154 | - |
|
155 | - if ($results) { |
|
156 | - $revenue[] = array( |
|
157 | - __('Date (only shows dates that have a revenue greater than 1)', 'event_espresso'), |
|
158 | - __('Total Revenue', 'event_espresso'), |
|
159 | - ); |
|
160 | - foreach ($results as $result) { |
|
161 | - $revenue[] = array($result->txnDate, (float) $result->revenue); |
|
162 | - } |
|
163 | - |
|
164 | - // setup the date range. |
|
165 | - $beginning_date = new DateTime('now' . $period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
166 | - $ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
167 | - $subtitle = sprintf( |
|
168 | - _x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), |
|
169 | - $beginning_date->format('Y-m-d'), |
|
170 | - $ending_date->format('Y-m-d') |
|
171 | - ); |
|
172 | - } |
|
173 | - |
|
174 | - $report_title = esc_html__('Total Revenue per Day', 'event_espresso'); |
|
175 | - |
|
176 | - $report_params = array( |
|
177 | - 'title' => $report_title, |
|
178 | - 'subtitle' => $subtitle, |
|
179 | - 'id' => $report_ID, |
|
180 | - 'revenue' => $revenue, |
|
181 | - 'noResults' => empty($revenue) || count($revenue) === 1, |
|
182 | - 'noTxnMsg' => sprintf( |
|
183 | - __('%sThere is no revenue to report for the last 30 days.%s', 'event_espresso'), |
|
184 | - '<h2>' . $report_title . '</h2><p>', |
|
185 | - '</p>' |
|
186 | - ), |
|
187 | - ); |
|
188 | - wp_localize_script('ee-txn-reports-js', 'txnRevPerDay', $report_params); |
|
189 | - |
|
190 | - return $report_ID; |
|
191 | - } |
|
192 | - |
|
193 | - |
|
194 | - /** |
|
195 | - * _revenue_per_event_report |
|
196 | - * generates Business Report showing total revenue per event. |
|
197 | - * |
|
198 | - * @param string $period The period (acceptable by PHP Datetime constructor) for which the report is generated. |
|
199 | - * |
|
200 | - * @return int |
|
201 | - */ |
|
202 | - private function _revenue_per_event_report($period = '-1 month') |
|
203 | - { |
|
204 | - |
|
205 | - $report_ID = 'txn-admin-revenue-per-event-report-dv'; |
|
206 | - |
|
207 | - $TXN = EEM_Transaction::instance(); |
|
208 | - $results = $TXN->get_revenue_per_event_report($period); |
|
209 | - $results = (array) $results; |
|
210 | - $revenue = array(); |
|
211 | - $subtitle = ''; |
|
212 | - |
|
213 | - if ($results) { |
|
214 | - $revenue[] = array( |
|
215 | - __('Event (only events that have a revenue greater than 1 are shown)', 'event_espresso'), |
|
216 | - __('Total Revenue', 'event_espresso'), |
|
217 | - ); |
|
218 | - foreach ($results as $result) { |
|
219 | - if ($result->revenue > 1) { |
|
220 | - $event_name = stripslashes(html_entity_decode($result->event_name, ENT_QUOTES, 'UTF-8')); |
|
221 | - $event_name = wp_trim_words($event_name, 5, '...'); |
|
222 | - $revenue[] = array($event_name, (float) $result->revenue); |
|
223 | - } |
|
224 | - } |
|
225 | - |
|
226 | - // setup the date range. |
|
227 | - $beginning_date = new DateTime('now' . $period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
228 | - $ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
229 | - $subtitle = sprintf( |
|
230 | - _x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), |
|
231 | - $beginning_date->format('Y-m-d'), |
|
232 | - $ending_date->format('Y-m-d') |
|
233 | - ); |
|
234 | - } |
|
235 | - |
|
236 | - $report_title = esc_html__('Total Revenue per Event', 'event_espresso'); |
|
237 | - |
|
238 | - $report_params = array( |
|
239 | - 'title' => $report_title, |
|
240 | - 'subtitle' => $subtitle, |
|
241 | - 'id' => $report_ID, |
|
242 | - 'revenue' => $revenue, |
|
243 | - 'noResults' => empty($revenue), |
|
244 | - 'noTxnMsg' => sprintf( |
|
245 | - __('%sThere is no revenue to report for the last 30 days.%s', 'event_espresso'), |
|
246 | - '<h2>' . $report_title . '</h2><p>', |
|
247 | - '</p>' |
|
248 | - ), |
|
249 | - ); |
|
250 | - wp_localize_script('ee-txn-reports-js', 'txnRevPerEvent', $report_params); |
|
251 | - |
|
252 | - return $report_ID; |
|
253 | - } |
|
19 | + /** |
|
20 | + * This is used to hold the reports template data which is setup early in the request. |
|
21 | + * |
|
22 | + * @type array |
|
23 | + */ |
|
24 | + protected $_reports_template_data = array(); |
|
25 | + |
|
26 | + /** |
|
27 | + * @Constructor |
|
28 | + * @access public |
|
29 | + * |
|
30 | + * @param bool $routing |
|
31 | + * |
|
32 | + * @return \Extend_Transactions_Admin_Page |
|
33 | + */ |
|
34 | + public function __construct($routing = true) |
|
35 | + { |
|
36 | + parent::__construct($routing); |
|
37 | + define('TXN_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/templates/'); |
|
38 | + define('TXN_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/assets/'); |
|
39 | + define('TXN_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'transactions/assets/'); |
|
40 | + } |
|
41 | + |
|
42 | + |
|
43 | + /** |
|
44 | + * _extend_page_config |
|
45 | + * |
|
46 | + * @access protected |
|
47 | + * @return void |
|
48 | + */ |
|
49 | + protected function _extend_page_config() |
|
50 | + { |
|
51 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'transactions'; |
|
52 | + |
|
53 | + $new_page_routes = array( |
|
54 | + 'reports' => array( |
|
55 | + 'func' => '_transaction_reports', |
|
56 | + 'capability' => 'ee_read_transactions', |
|
57 | + ), |
|
58 | + ); |
|
59 | + |
|
60 | + $this->_page_routes = array_merge($this->_page_routes, $new_page_routes); |
|
61 | + |
|
62 | + $new_page_config = array( |
|
63 | + 'reports' => array( |
|
64 | + 'nav' => array( |
|
65 | + 'label' => __('Reports', 'event_espresso'), |
|
66 | + 'order' => 20, |
|
67 | + ), |
|
68 | + 'help_tabs' => array( |
|
69 | + 'transactions_reports_help_tab' => array( |
|
70 | + 'title' => __('Transaction Reports', 'event_espresso'), |
|
71 | + 'filename' => 'transactions_reports', |
|
72 | + ), |
|
73 | + ), |
|
74 | + /*'help_tour' => array( 'Transaction_Reports_Help_Tour' ),*/ |
|
75 | + 'require_nonce' => false, |
|
76 | + ), |
|
77 | + ); |
|
78 | + $this->_page_config = array_merge($this->_page_config, $new_page_config); |
|
79 | + } |
|
80 | + |
|
81 | + |
|
82 | + /** |
|
83 | + * load_scripts_styles_reports |
|
84 | + * |
|
85 | + * @access public |
|
86 | + * @return void |
|
87 | + */ |
|
88 | + public function load_scripts_styles_reports() |
|
89 | + { |
|
90 | + wp_register_script( |
|
91 | + 'ee-txn-reports-js', |
|
92 | + TXN_CAF_ASSETS_URL . 'ee-transaction-admin-reports.js', |
|
93 | + array('google-charts'), |
|
94 | + EVENT_ESPRESSO_VERSION, |
|
95 | + true |
|
96 | + ); |
|
97 | + wp_enqueue_script('ee-txn-reports-js'); |
|
98 | + $this->_transaction_reports_js_setup(); |
|
99 | + EE_Registry::$i18n_js_strings['currency_format'] = EEH_Money::get_format_for_google_charts(); |
|
100 | + } |
|
101 | + |
|
102 | + |
|
103 | + /** |
|
104 | + * This is called when javascript is being enqueued to setup the various data needed for the reports js. |
|
105 | + * Also $this->{$_reports_template_data} property is set for later usage by the _transaction_reports method. |
|
106 | + */ |
|
107 | + protected function _transaction_reports_js_setup() |
|
108 | + { |
|
109 | + $this->_reports_template_data['admin_reports'][] = $this->_revenue_per_day_report(); |
|
110 | + $this->_reports_template_data['admin_reports'][] = $this->_revenue_per_event_report(); |
|
111 | + } |
|
112 | + |
|
113 | + |
|
114 | + /** |
|
115 | + * _transaction_reports |
|
116 | + * generates Business Reports regarding Transactions |
|
117 | + * |
|
118 | + * @return void |
|
119 | + */ |
|
120 | + protected function _transaction_reports() |
|
121 | + { |
|
122 | + $template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php'; |
|
123 | + $this->_admin_page_title = __('Transactions', 'event_espresso'); |
|
124 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
|
125 | + $template_path, |
|
126 | + $this->_reports_template_data, |
|
127 | + true |
|
128 | + ); |
|
129 | + |
|
130 | + // the final template wrapper |
|
131 | + $this->display_admin_page_with_no_sidebar(); |
|
132 | + } |
|
133 | + |
|
134 | + |
|
135 | + /** |
|
136 | + * _revenue_per_day_report |
|
137 | + * generates Business Report showing Total Revenue per Day. |
|
138 | + * |
|
139 | + * @param string $period The period (acceptable by PHP Datetime constructor) for which the report is generated. |
|
140 | + * |
|
141 | + * @return string |
|
142 | + */ |
|
143 | + private function _revenue_per_day_report($period = '-1 month') |
|
144 | + { |
|
145 | + |
|
146 | + $report_ID = 'txn-admin-revenue-per-day-report-dv'; |
|
147 | + |
|
148 | + $TXN = EEM_Transaction::instance(); |
|
149 | + |
|
150 | + $results = $TXN->get_revenue_per_day_report($period); |
|
151 | + $results = (array) $results; |
|
152 | + $revenue = array(); |
|
153 | + $subtitle = ''; |
|
154 | + |
|
155 | + if ($results) { |
|
156 | + $revenue[] = array( |
|
157 | + __('Date (only shows dates that have a revenue greater than 1)', 'event_espresso'), |
|
158 | + __('Total Revenue', 'event_espresso'), |
|
159 | + ); |
|
160 | + foreach ($results as $result) { |
|
161 | + $revenue[] = array($result->txnDate, (float) $result->revenue); |
|
162 | + } |
|
163 | + |
|
164 | + // setup the date range. |
|
165 | + $beginning_date = new DateTime('now' . $period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
166 | + $ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
167 | + $subtitle = sprintf( |
|
168 | + _x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), |
|
169 | + $beginning_date->format('Y-m-d'), |
|
170 | + $ending_date->format('Y-m-d') |
|
171 | + ); |
|
172 | + } |
|
173 | + |
|
174 | + $report_title = esc_html__('Total Revenue per Day', 'event_espresso'); |
|
175 | + |
|
176 | + $report_params = array( |
|
177 | + 'title' => $report_title, |
|
178 | + 'subtitle' => $subtitle, |
|
179 | + 'id' => $report_ID, |
|
180 | + 'revenue' => $revenue, |
|
181 | + 'noResults' => empty($revenue) || count($revenue) === 1, |
|
182 | + 'noTxnMsg' => sprintf( |
|
183 | + __('%sThere is no revenue to report for the last 30 days.%s', 'event_espresso'), |
|
184 | + '<h2>' . $report_title . '</h2><p>', |
|
185 | + '</p>' |
|
186 | + ), |
|
187 | + ); |
|
188 | + wp_localize_script('ee-txn-reports-js', 'txnRevPerDay', $report_params); |
|
189 | + |
|
190 | + return $report_ID; |
|
191 | + } |
|
192 | + |
|
193 | + |
|
194 | + /** |
|
195 | + * _revenue_per_event_report |
|
196 | + * generates Business Report showing total revenue per event. |
|
197 | + * |
|
198 | + * @param string $period The period (acceptable by PHP Datetime constructor) for which the report is generated. |
|
199 | + * |
|
200 | + * @return int |
|
201 | + */ |
|
202 | + private function _revenue_per_event_report($period = '-1 month') |
|
203 | + { |
|
204 | + |
|
205 | + $report_ID = 'txn-admin-revenue-per-event-report-dv'; |
|
206 | + |
|
207 | + $TXN = EEM_Transaction::instance(); |
|
208 | + $results = $TXN->get_revenue_per_event_report($period); |
|
209 | + $results = (array) $results; |
|
210 | + $revenue = array(); |
|
211 | + $subtitle = ''; |
|
212 | + |
|
213 | + if ($results) { |
|
214 | + $revenue[] = array( |
|
215 | + __('Event (only events that have a revenue greater than 1 are shown)', 'event_espresso'), |
|
216 | + __('Total Revenue', 'event_espresso'), |
|
217 | + ); |
|
218 | + foreach ($results as $result) { |
|
219 | + if ($result->revenue > 1) { |
|
220 | + $event_name = stripslashes(html_entity_decode($result->event_name, ENT_QUOTES, 'UTF-8')); |
|
221 | + $event_name = wp_trim_words($event_name, 5, '...'); |
|
222 | + $revenue[] = array($event_name, (float) $result->revenue); |
|
223 | + } |
|
224 | + } |
|
225 | + |
|
226 | + // setup the date range. |
|
227 | + $beginning_date = new DateTime('now' . $period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
228 | + $ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
229 | + $subtitle = sprintf( |
|
230 | + _x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), |
|
231 | + $beginning_date->format('Y-m-d'), |
|
232 | + $ending_date->format('Y-m-d') |
|
233 | + ); |
|
234 | + } |
|
235 | + |
|
236 | + $report_title = esc_html__('Total Revenue per Event', 'event_espresso'); |
|
237 | + |
|
238 | + $report_params = array( |
|
239 | + 'title' => $report_title, |
|
240 | + 'subtitle' => $subtitle, |
|
241 | + 'id' => $report_ID, |
|
242 | + 'revenue' => $revenue, |
|
243 | + 'noResults' => empty($revenue), |
|
244 | + 'noTxnMsg' => sprintf( |
|
245 | + __('%sThere is no revenue to report for the last 30 days.%s', 'event_espresso'), |
|
246 | + '<h2>' . $report_title . '</h2><p>', |
|
247 | + '</p>' |
|
248 | + ), |
|
249 | + ); |
|
250 | + wp_localize_script('ee-txn-reports-js', 'txnRevPerEvent', $report_params); |
|
251 | + |
|
252 | + return $report_ID; |
|
253 | + } |
|
254 | 254 | } |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | public function __construct($routing = true) |
35 | 35 | { |
36 | 36 | parent::__construct($routing); |
37 | - define('TXN_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/templates/'); |
|
38 | - define('TXN_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/assets/'); |
|
39 | - define('TXN_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'transactions/assets/'); |
|
37 | + define('TXN_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'transactions/templates/'); |
|
38 | + define('TXN_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND.'transactions/assets/'); |
|
39 | + define('TXN_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'transactions/assets/'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | protected function _extend_page_config() |
50 | 50 | { |
51 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'transactions'; |
|
51 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'transactions'; |
|
52 | 52 | |
53 | 53 | $new_page_routes = array( |
54 | 54 | 'reports' => array( |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | { |
90 | 90 | wp_register_script( |
91 | 91 | 'ee-txn-reports-js', |
92 | - TXN_CAF_ASSETS_URL . 'ee-transaction-admin-reports.js', |
|
92 | + TXN_CAF_ASSETS_URL.'ee-transaction-admin-reports.js', |
|
93 | 93 | array('google-charts'), |
94 | 94 | EVENT_ESPRESSO_VERSION, |
95 | 95 | true |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | protected function _transaction_reports() |
121 | 121 | { |
122 | - $template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php'; |
|
122 | + $template_path = EE_ADMIN_TEMPLATE.'admin_reports.template.php'; |
|
123 | 123 | $this->_admin_page_title = __('Transactions', 'event_espresso'); |
124 | 124 | $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
125 | 125 | $template_path, |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | // setup the date range. |
165 | - $beginning_date = new DateTime('now' . $period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
165 | + $beginning_date = new DateTime('now'.$period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
166 | 166 | $ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
167 | 167 | $subtitle = sprintf( |
168 | 168 | _x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | 'noResults' => empty($revenue) || count($revenue) === 1, |
182 | 182 | 'noTxnMsg' => sprintf( |
183 | 183 | __('%sThere is no revenue to report for the last 30 days.%s', 'event_espresso'), |
184 | - '<h2>' . $report_title . '</h2><p>', |
|
184 | + '<h2>'.$report_title.'</h2><p>', |
|
185 | 185 | '</p>' |
186 | 186 | ), |
187 | 187 | ); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | // setup the date range. |
227 | - $beginning_date = new DateTime('now' . $period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
227 | + $beginning_date = new DateTime('now'.$period, new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
|
228 | 228 | $ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone())); |
229 | 229 | $subtitle = sprintf( |
230 | 230 | _x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | 'noResults' => empty($revenue), |
244 | 244 | 'noTxnMsg' => sprintf( |
245 | 245 | __('%sThere is no revenue to report for the last 30 days.%s', 'event_espresso'), |
246 | - '<h2>' . $report_title . '</h2><p>', |
|
246 | + '<h2>'.$report_title.'</h2><p>', |
|
247 | 247 | '</p>' |
248 | 248 | ), |
249 | 249 | ); |
@@ -15,189 +15,189 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - protected function _set_tips_array() |
|
19 | - { |
|
20 | - $this->_qtipsa = array( |
|
21 | - 0 => array( |
|
22 | - 'content_id' => 'about-taxable-toggle', |
|
23 | - 'target' => '.TKT-taxable-checkbox', |
|
24 | - 'content' => $this->_get_taxable_info_content(), |
|
25 | - 'options' => array( |
|
26 | - 'show_only_once' => true, |
|
27 | - 'content' => array( |
|
28 | - 'title' => __('Taxable Ticket Toggle', 'event_espresso'), |
|
29 | - 'button' => true, |
|
30 | - ), |
|
31 | - 'show' => array( |
|
32 | - 'event' => 'click', |
|
33 | - ), |
|
34 | - 'hide' => array( |
|
35 | - 'event' => false, |
|
36 | - ), |
|
37 | - 'style' => array( |
|
38 | - 'classes' => '', |
|
39 | - ), |
|
40 | - )// defaults |
|
41 | - ), |
|
42 | - 1 => array( |
|
43 | - 'content_id' => 'ticket-icon-help', |
|
44 | - 'target' => '.ticket-icon', |
|
45 | - 'content' => __('Assigned Tickets', 'event_espresso'), |
|
46 | - ), |
|
47 | - 2 => array( |
|
48 | - 'content_id' => 'clone-icon-help', |
|
49 | - 'target' => '.clone-icon', |
|
50 | - 'content' => __('Duplicate this Item', 'event_espresso'), |
|
51 | - ), |
|
52 | - 3 => array( |
|
53 | - 'content_id' => 'trash-datetime-help', |
|
54 | - 'target' => '.datetime-edit-table .trash-icon', |
|
55 | - 'content' => __('Trash Datetime', 'event_espresso'), |
|
56 | - ), |
|
57 | - 4 => array( |
|
58 | - 'content_id' => 'trash-ticket-help', |
|
59 | - 'target' => '.ticket-row .trash-icon', |
|
60 | - 'content' => __('Trash Ticket', 'event_espresso'), |
|
61 | - ), |
|
62 | - 5 => array( |
|
63 | - 'content_id' => 'trash-price-modifier-help', |
|
64 | - 'target' => '.ticket-price-rows .trash-icon', |
|
65 | - 'content' => __('Trash Price Modifier', 'event_espresso'), |
|
66 | - ), |
|
67 | - 6 => array( |
|
68 | - 'content_id' => 'gear-icon-help', |
|
69 | - 'target' => '.gear-icon', |
|
70 | - 'content' => __('Advanced Settings', 'event_espresso'), |
|
71 | - ), |
|
72 | - 7 => array( |
|
73 | - 'content_id' => 'tkt-status-archived', |
|
74 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::archived, |
|
75 | - 'content' => $this->_ticket_status_legend(EE_Ticket::archived), |
|
76 | - 'options' => array( |
|
77 | - 'position' => array( |
|
78 | - 'target' => 'mouse', |
|
79 | - 'adjust' => array( |
|
80 | - 'mouse' => false, |
|
81 | - ), |
|
82 | - ), |
|
83 | - ), |
|
84 | - ), |
|
85 | - 8 => array( |
|
86 | - 'content_id' => 'tkt-status-expired', |
|
87 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::expired, |
|
88 | - 'content' => $this->_ticket_status_legend(EE_Ticket::expired), |
|
89 | - 'options' => array( |
|
90 | - 'position' => array( |
|
91 | - 'target' => 'mouse', |
|
92 | - 'adjust' => array( |
|
93 | - 'mouse' => false, |
|
94 | - ), |
|
95 | - ), |
|
96 | - ), |
|
97 | - ), |
|
98 | - 9 => array( |
|
99 | - 'content_id' => 'tkt-status-sold_out', |
|
100 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::sold_out, |
|
101 | - 'content' => $this->_ticket_status_legend(EE_Ticket::sold_out), |
|
102 | - 'options' => array( |
|
103 | - 'position' => array( |
|
104 | - 'target' => 'mouse', |
|
105 | - 'adjust' => array( |
|
106 | - 'mouse' => false, |
|
107 | - ), |
|
108 | - ), |
|
109 | - ), |
|
110 | - ), |
|
111 | - 10 => array( |
|
112 | - 'content_id' => 'tkt-status-pending', |
|
113 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::pending, |
|
114 | - 'content' => $this->_ticket_status_legend(EE_Ticket::pending), |
|
115 | - 'options' => array( |
|
116 | - 'position' => array( |
|
117 | - 'target' => 'mouse', |
|
118 | - 'adjust' => array( |
|
119 | - 'mouse' => false, |
|
120 | - ), |
|
121 | - ), |
|
122 | - ), |
|
123 | - ), |
|
124 | - 11 => array( |
|
125 | - 'content_id' => 'tkt-status-onsale', |
|
126 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::onsale, |
|
127 | - 'content' => $this->_ticket_status_legend(EE_Ticket::onsale), |
|
128 | - 'options' => array( |
|
129 | - 'position' => array( |
|
130 | - 'target' => 'mouse', |
|
131 | - 'adjust' => array( |
|
132 | - 'mouse' => false, |
|
133 | - ), |
|
134 | - ), |
|
135 | - ), |
|
136 | - ), |
|
137 | - 12 => array( |
|
138 | - 'content_id' => 'sortable-tkt-drag-handle-tip', |
|
139 | - 'target' => '.ee-ticket-sortable .sortable-drag-handle', |
|
140 | - 'content' => __('Click and drag-n-drop to reorder tickets.', 'event_espresso'), |
|
141 | - 'options' => array( |
|
142 | - 'position' => array( |
|
143 | - 'adjust' => array( |
|
144 | - 'mouse' => false, |
|
145 | - 'y' => 5, |
|
146 | - ), |
|
147 | - ), |
|
148 | - ), |
|
149 | - ), |
|
150 | - 13 => array( |
|
151 | - 'content_id' => 'sortable-dtt-drag-handle-tip', |
|
152 | - 'target' => '.ee-dtt-sortable .sortable-drag-handle', |
|
153 | - 'content' => __('Click and drag-n-drop to reorder datetimes.', 'event_espresso'), |
|
154 | - 'options' => array( |
|
155 | - 'position' => array( |
|
156 | - 'adjust' => array( |
|
157 | - 'mouse' => false, |
|
158 | - 'y' => 5, |
|
159 | - ), |
|
160 | - ), |
|
161 | - ), |
|
162 | - ), |
|
163 | - ); |
|
164 | - } |
|
18 | + protected function _set_tips_array() |
|
19 | + { |
|
20 | + $this->_qtipsa = array( |
|
21 | + 0 => array( |
|
22 | + 'content_id' => 'about-taxable-toggle', |
|
23 | + 'target' => '.TKT-taxable-checkbox', |
|
24 | + 'content' => $this->_get_taxable_info_content(), |
|
25 | + 'options' => array( |
|
26 | + 'show_only_once' => true, |
|
27 | + 'content' => array( |
|
28 | + 'title' => __('Taxable Ticket Toggle', 'event_espresso'), |
|
29 | + 'button' => true, |
|
30 | + ), |
|
31 | + 'show' => array( |
|
32 | + 'event' => 'click', |
|
33 | + ), |
|
34 | + 'hide' => array( |
|
35 | + 'event' => false, |
|
36 | + ), |
|
37 | + 'style' => array( |
|
38 | + 'classes' => '', |
|
39 | + ), |
|
40 | + )// defaults |
|
41 | + ), |
|
42 | + 1 => array( |
|
43 | + 'content_id' => 'ticket-icon-help', |
|
44 | + 'target' => '.ticket-icon', |
|
45 | + 'content' => __('Assigned Tickets', 'event_espresso'), |
|
46 | + ), |
|
47 | + 2 => array( |
|
48 | + 'content_id' => 'clone-icon-help', |
|
49 | + 'target' => '.clone-icon', |
|
50 | + 'content' => __('Duplicate this Item', 'event_espresso'), |
|
51 | + ), |
|
52 | + 3 => array( |
|
53 | + 'content_id' => 'trash-datetime-help', |
|
54 | + 'target' => '.datetime-edit-table .trash-icon', |
|
55 | + 'content' => __('Trash Datetime', 'event_espresso'), |
|
56 | + ), |
|
57 | + 4 => array( |
|
58 | + 'content_id' => 'trash-ticket-help', |
|
59 | + 'target' => '.ticket-row .trash-icon', |
|
60 | + 'content' => __('Trash Ticket', 'event_espresso'), |
|
61 | + ), |
|
62 | + 5 => array( |
|
63 | + 'content_id' => 'trash-price-modifier-help', |
|
64 | + 'target' => '.ticket-price-rows .trash-icon', |
|
65 | + 'content' => __('Trash Price Modifier', 'event_espresso'), |
|
66 | + ), |
|
67 | + 6 => array( |
|
68 | + 'content_id' => 'gear-icon-help', |
|
69 | + 'target' => '.gear-icon', |
|
70 | + 'content' => __('Advanced Settings', 'event_espresso'), |
|
71 | + ), |
|
72 | + 7 => array( |
|
73 | + 'content_id' => 'tkt-status-archived', |
|
74 | + 'target' => '.ticket-row .tkt-status-' . EE_Ticket::archived, |
|
75 | + 'content' => $this->_ticket_status_legend(EE_Ticket::archived), |
|
76 | + 'options' => array( |
|
77 | + 'position' => array( |
|
78 | + 'target' => 'mouse', |
|
79 | + 'adjust' => array( |
|
80 | + 'mouse' => false, |
|
81 | + ), |
|
82 | + ), |
|
83 | + ), |
|
84 | + ), |
|
85 | + 8 => array( |
|
86 | + 'content_id' => 'tkt-status-expired', |
|
87 | + 'target' => '.ticket-row .tkt-status-' . EE_Ticket::expired, |
|
88 | + 'content' => $this->_ticket_status_legend(EE_Ticket::expired), |
|
89 | + 'options' => array( |
|
90 | + 'position' => array( |
|
91 | + 'target' => 'mouse', |
|
92 | + 'adjust' => array( |
|
93 | + 'mouse' => false, |
|
94 | + ), |
|
95 | + ), |
|
96 | + ), |
|
97 | + ), |
|
98 | + 9 => array( |
|
99 | + 'content_id' => 'tkt-status-sold_out', |
|
100 | + 'target' => '.ticket-row .tkt-status-' . EE_Ticket::sold_out, |
|
101 | + 'content' => $this->_ticket_status_legend(EE_Ticket::sold_out), |
|
102 | + 'options' => array( |
|
103 | + 'position' => array( |
|
104 | + 'target' => 'mouse', |
|
105 | + 'adjust' => array( |
|
106 | + 'mouse' => false, |
|
107 | + ), |
|
108 | + ), |
|
109 | + ), |
|
110 | + ), |
|
111 | + 10 => array( |
|
112 | + 'content_id' => 'tkt-status-pending', |
|
113 | + 'target' => '.ticket-row .tkt-status-' . EE_Ticket::pending, |
|
114 | + 'content' => $this->_ticket_status_legend(EE_Ticket::pending), |
|
115 | + 'options' => array( |
|
116 | + 'position' => array( |
|
117 | + 'target' => 'mouse', |
|
118 | + 'adjust' => array( |
|
119 | + 'mouse' => false, |
|
120 | + ), |
|
121 | + ), |
|
122 | + ), |
|
123 | + ), |
|
124 | + 11 => array( |
|
125 | + 'content_id' => 'tkt-status-onsale', |
|
126 | + 'target' => '.ticket-row .tkt-status-' . EE_Ticket::onsale, |
|
127 | + 'content' => $this->_ticket_status_legend(EE_Ticket::onsale), |
|
128 | + 'options' => array( |
|
129 | + 'position' => array( |
|
130 | + 'target' => 'mouse', |
|
131 | + 'adjust' => array( |
|
132 | + 'mouse' => false, |
|
133 | + ), |
|
134 | + ), |
|
135 | + ), |
|
136 | + ), |
|
137 | + 12 => array( |
|
138 | + 'content_id' => 'sortable-tkt-drag-handle-tip', |
|
139 | + 'target' => '.ee-ticket-sortable .sortable-drag-handle', |
|
140 | + 'content' => __('Click and drag-n-drop to reorder tickets.', 'event_espresso'), |
|
141 | + 'options' => array( |
|
142 | + 'position' => array( |
|
143 | + 'adjust' => array( |
|
144 | + 'mouse' => false, |
|
145 | + 'y' => 5, |
|
146 | + ), |
|
147 | + ), |
|
148 | + ), |
|
149 | + ), |
|
150 | + 13 => array( |
|
151 | + 'content_id' => 'sortable-dtt-drag-handle-tip', |
|
152 | + 'target' => '.ee-dtt-sortable .sortable-drag-handle', |
|
153 | + 'content' => __('Click and drag-n-drop to reorder datetimes.', 'event_espresso'), |
|
154 | + 'options' => array( |
|
155 | + 'position' => array( |
|
156 | + 'adjust' => array( |
|
157 | + 'mouse' => false, |
|
158 | + 'y' => 5, |
|
159 | + ), |
|
160 | + ), |
|
161 | + ), |
|
162 | + ), |
|
163 | + ); |
|
164 | + } |
|
165 | 165 | |
166 | 166 | |
167 | - private function _get_taxable_info_content() |
|
168 | - { |
|
169 | - $price_admin_link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default'), PRICING_ADMIN_URL); |
|
170 | - return '<p>' |
|
171 | - . sprintf( |
|
172 | - __( |
|
173 | - 'Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)', |
|
174 | - 'event_espresso' |
|
175 | - ), |
|
176 | - '<a href="' . $price_admin_link . '" title="' . esc_attr__( |
|
177 | - 'Pricing Admin Page', |
|
178 | - 'event_espresso' |
|
179 | - ) . '">', |
|
180 | - '</a>' |
|
181 | - ) . '</p>'; |
|
182 | - } |
|
167 | + private function _get_taxable_info_content() |
|
168 | + { |
|
169 | + $price_admin_link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default'), PRICING_ADMIN_URL); |
|
170 | + return '<p>' |
|
171 | + . sprintf( |
|
172 | + __( |
|
173 | + 'Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)', |
|
174 | + 'event_espresso' |
|
175 | + ), |
|
176 | + '<a href="' . $price_admin_link . '" title="' . esc_attr__( |
|
177 | + 'Pricing Admin Page', |
|
178 | + 'event_espresso' |
|
179 | + ) . '">', |
|
180 | + '</a>' |
|
181 | + ) . '</p>'; |
|
182 | + } |
|
183 | 183 | |
184 | - /** |
|
185 | - * output the relevant ee-status-legend with the designated status highlighted. |
|
186 | - * |
|
187 | - * @param EE_Ticket constant $status What status is set (by class) |
|
188 | - * @return string The status legend with the related status highlighted |
|
189 | - */ |
|
190 | - private function _ticket_status_legend($status) |
|
191 | - { |
|
184 | + /** |
|
185 | + * output the relevant ee-status-legend with the designated status highlighted. |
|
186 | + * |
|
187 | + * @param EE_Ticket constant $status What status is set (by class) |
|
188 | + * @return string The status legend with the related status highlighted |
|
189 | + */ |
|
190 | + private function _ticket_status_legend($status) |
|
191 | + { |
|
192 | 192 | |
193 | - $status_array = array( |
|
194 | - 'archived' => EE_Ticket::archived, |
|
195 | - 'expired' => EE_Ticket::expired, |
|
196 | - 'sold_out' => EE_Ticket::sold_out, |
|
197 | - 'pending' => EE_Ticket::pending, |
|
198 | - 'onsale' => EE_Ticket::onsale, |
|
199 | - ); |
|
193 | + $status_array = array( |
|
194 | + 'archived' => EE_Ticket::archived, |
|
195 | + 'expired' => EE_Ticket::expired, |
|
196 | + 'sold_out' => EE_Ticket::sold_out, |
|
197 | + 'pending' => EE_Ticket::pending, |
|
198 | + 'onsale' => EE_Ticket::onsale, |
|
199 | + ); |
|
200 | 200 | |
201 | - return EEH_Template::status_legend($status_array, $status); |
|
202 | - } |
|
201 | + return EEH_Template::status_legend($status_array, $status); |
|
202 | + } |
|
203 | 203 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ), |
72 | 72 | 7 => array( |
73 | 73 | 'content_id' => 'tkt-status-archived', |
74 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::archived, |
|
74 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::archived, |
|
75 | 75 | 'content' => $this->_ticket_status_legend(EE_Ticket::archived), |
76 | 76 | 'options' => array( |
77 | 77 | 'position' => array( |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ), |
85 | 85 | 8 => array( |
86 | 86 | 'content_id' => 'tkt-status-expired', |
87 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::expired, |
|
87 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::expired, |
|
88 | 88 | 'content' => $this->_ticket_status_legend(EE_Ticket::expired), |
89 | 89 | 'options' => array( |
90 | 90 | 'position' => array( |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | ), |
98 | 98 | 9 => array( |
99 | 99 | 'content_id' => 'tkt-status-sold_out', |
100 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::sold_out, |
|
100 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::sold_out, |
|
101 | 101 | 'content' => $this->_ticket_status_legend(EE_Ticket::sold_out), |
102 | 102 | 'options' => array( |
103 | 103 | 'position' => array( |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ), |
111 | 111 | 10 => array( |
112 | 112 | 'content_id' => 'tkt-status-pending', |
113 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::pending, |
|
113 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::pending, |
|
114 | 114 | 'content' => $this->_ticket_status_legend(EE_Ticket::pending), |
115 | 115 | 'options' => array( |
116 | 116 | 'position' => array( |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | ), |
124 | 124 | 11 => array( |
125 | 125 | 'content_id' => 'tkt-status-onsale', |
126 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::onsale, |
|
126 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::onsale, |
|
127 | 127 | 'content' => $this->_ticket_status_legend(EE_Ticket::onsale), |
128 | 128 | 'options' => array( |
129 | 129 | 'position' => array( |
@@ -173,12 +173,12 @@ discard block |
||
173 | 173 | 'Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)', |
174 | 174 | 'event_espresso' |
175 | 175 | ), |
176 | - '<a href="' . $price_admin_link . '" title="' . esc_attr__( |
|
176 | + '<a href="'.$price_admin_link.'" title="'.esc_attr__( |
|
177 | 177 | 'Pricing Admin Page', |
178 | 178 | 'event_espresso' |
179 | - ) . '">', |
|
179 | + ).'">', |
|
180 | 180 | '</a>' |
181 | - ) . '</p>'; |
|
181 | + ).'</p>'; |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -1,48 +1,48 @@ |
||
1 | 1 | <p><strong><?php _e('Importing CSV Event Espresso Data', 'event_espresso'); ?></strong></p> |
2 | 2 | <p> |
3 | 3 | <?php _e( |
4 | - 'The importer can be used to import event information into Event Espresso using a CSV file.', |
|
5 | - 'event_espresso' |
|
6 | - ); ?> |
|
4 | + 'The importer can be used to import event information into Event Espresso using a CSV file.', |
|
5 | + 'event_espresso' |
|
6 | + ); ?> |
|
7 | 7 | </p> |
8 | 8 | <p><strong><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso'); ?></strong></p> |
9 | 9 | <p> |
10 | 10 | <?php _e( |
11 | - 'To import Event Espresso data from another Event Espresso 4 install, export a CSV file from the admin Events overview page, or anywhere you can generate a CSV export file from. Then upload that file here (regardless of what type of information was exported).', |
|
12 | - 'event_espresso' |
|
13 | - ); ?> |
|
11 | + 'To import Event Espresso data from another Event Espresso 4 install, export a CSV file from the admin Events overview page, or anywhere you can generate a CSV export file from. Then upload that file here (regardless of what type of information was exported).', |
|
12 | + 'event_espresso' |
|
13 | + ); ?> |
|
14 | 14 | </p> |
15 | 15 | <p> |
16 | 16 | <?php _e( |
17 | - 'Note: its possible that data from the other site have the same IDs as data in this site. The importer recognizes that this data is from a different database and inserts new items for each item in the CSV file, regardless of whether its ID matches that of an item in this site\'s database or not. However, the importer also remembers the mapping from the old site\'s database to this site\'s database, and on subsequent CSV importers from that site, the data in this database will be updated instead of re-inserting new items.', |
|
18 | - 'event_espresso' |
|
19 | - ); ?> |
|
17 | + 'Note: its possible that data from the other site have the same IDs as data in this site. The importer recognizes that this data is from a different database and inserts new items for each item in the CSV file, regardless of whether its ID matches that of an item in this site\'s database or not. However, the importer also remembers the mapping from the old site\'s database to this site\'s database, and on subsequent CSV importers from that site, the data in this database will be updated instead of re-inserting new items.', |
|
18 | + 'event_espresso' |
|
19 | + ); ?> |
|
20 | 20 | </p> |
21 | 21 | <p><strong><?php _e("Importing from this Site", 'event_espresso'); ?></strong></p> |
22 | 22 | <p><?php |
23 | - _e( |
|
24 | - "You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", |
|
25 | - 'event_espresso' |
|
26 | - ); ?></p> |
|
23 | + _e( |
|
24 | + "You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", |
|
25 | + 'event_espresso' |
|
26 | + ); ?></p> |
|
27 | 27 | |
28 | 28 | <p><strong><?php _e("Notes about Generating your own CSV Import Files", "event_espresso"); ?></strong></p> |
29 | 29 | <p><?php |
30 | - _e( |
|
31 | - "If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", |
|
32 | - "event_espresso" |
|
33 | - ); ?></p> |
|
30 | + _e( |
|
31 | + "If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", |
|
32 | + "event_espresso" |
|
33 | + ); ?></p> |
|
34 | 34 | <p><?php |
35 | - _e( |
|
36 | - "The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", |
|
37 | - "event_espresso" |
|
38 | - ); ?></p> |
|
35 | + _e( |
|
36 | + "The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", |
|
37 | + "event_espresso" |
|
38 | + ); ?></p> |
|
39 | 39 | <p><?php |
40 | - _e( |
|
41 | - "In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", |
|
42 | - "event_espresso" |
|
43 | - ); ?></p> |
|
40 | + _e( |
|
41 | + "In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", |
|
42 | + "event_espresso" |
|
43 | + ); ?></p> |
|
44 | 44 | <p><?php |
45 | - _e( |
|
46 | - "Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", |
|
47 | - "event_espresso" |
|
48 | - ); ?></p> |
|
49 | 45 | \ No newline at end of file |
46 | + _e( |
|
47 | + "Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", |
|
48 | + "event_espresso" |
|
49 | + ); ?></p> |
|
50 | 50 | \ No newline at end of file |