@@ -7,11 +7,11 @@ |
||
7 | 7 | <?php echo $nav_tabs; ?> |
8 | 8 | |
9 | 9 | <?php |
10 | - do_action('AHEE__admin_wrapper__template__before_admin_page_content'); |
|
11 | - echo $before_admin_page_content; |
|
12 | - echo $admin_page_content; |
|
13 | - echo $after_admin_page_content; |
|
14 | - do_action('AHEE__admin_wrapper__template__after_admin_page_content'); |
|
15 | - ?> |
|
10 | + do_action('AHEE__admin_wrapper__template__before_admin_page_content'); |
|
11 | + echo $before_admin_page_content; |
|
12 | + echo $admin_page_content; |
|
13 | + echo $after_admin_page_content; |
|
14 | + do_action('AHEE__admin_wrapper__template__after_admin_page_content'); |
|
15 | + ?> |
|
16 | 16 | |
17 | 17 | </div> |
@@ -9,11 +9,11 @@ |
||
9 | 9 | </div> <!-- post-body-content --> |
10 | 10 | |
11 | 11 | <?php |
12 | - // let's loop through the columns |
|
13 | - for ($i = 1; $i <= $num_columns; $i++) { |
|
14 | - $metaref = ($i === 1) ? 'normal' : 'side'; |
|
15 | - $metaref = ($i > 2) ? 'column' . $i : $metaref; |
|
16 | - ?> |
|
12 | + // let's loop through the columns |
|
13 | + for ($i = 1; $i <= $num_columns; $i++) { |
|
14 | + $metaref = ($i === 1) ? 'normal' : 'side'; |
|
15 | + $metaref = ($i > 2) ? 'column' . $i : $metaref; |
|
16 | + ?> |
|
17 | 17 | |
18 | 18 | <div id='postbox-container-<?php echo $i; ?>' class='postbox-container'> |
19 | 19 | <?php do_meta_boxes($current_page, $metaref, null); ?> |
@@ -12,7 +12,7 @@ |
||
12 | 12 | // let's loop through the columns |
13 | 13 | for ($i = 1; $i <= $num_columns; $i++) { |
14 | 14 | $metaref = ($i === 1) ? 'normal' : 'side'; |
15 | - $metaref = ($i > 2) ? 'column' . $i : $metaref; |
|
15 | + $metaref = ($i > 2) ? 'column'.$i : $metaref; |
|
16 | 16 | ?> |
17 | 17 | |
18 | 18 | <div id='postbox-container-<?php echo $i; ?>' class='postbox-container'> |
@@ -2,16 +2,16 @@ discard block |
||
2 | 2 | <ul class="infolinks"> |
3 | 3 | <li> |
4 | 4 | <?php |
5 | - echo '<a href="http://eventespresso.com/wiki/installation/" target="_blank">' |
|
6 | - . __( |
|
7 | - 'Installation', |
|
8 | - 'event_espresso' |
|
9 | - ) |
|
10 | - . '</a> & <a href="http://eventespresso.com/wiki/setting-up-event-espresso/" target="_blank">' |
|
11 | - . __( |
|
12 | - 'Usage Guide', |
|
13 | - 'event_espresso' |
|
14 | - ) . '</a>'; ?> |
|
5 | + echo '<a href="http://eventespresso.com/wiki/installation/" target="_blank">' |
|
6 | + . __( |
|
7 | + 'Installation', |
|
8 | + 'event_espresso' |
|
9 | + ) |
|
10 | + . '</a> & <a href="http://eventespresso.com/wiki/setting-up-event-espresso/" target="_blank">' |
|
11 | + . __( |
|
12 | + 'Usage Guide', |
|
13 | + 'event_espresso' |
|
14 | + ) . '</a>'; ?> |
|
15 | 15 | </li> |
16 | 16 | <li> |
17 | 17 | <a href="http://eventespresso.com/wiki/put-custom-templates/" target="_blank"> |
@@ -41,15 +41,15 @@ discard block |
||
41 | 41 | </li> |
42 | 42 | <li> |
43 | 43 | <?php echo '<a href="http://eventespresso.com/pricing/" target="_blank">' |
44 | - . __( |
|
45 | - 'Plugins', |
|
46 | - 'event_espresso' |
|
47 | - ) |
|
48 | - . '</a> & <a href="http://eventespresso.com/add-ons/" target="_blank">' |
|
49 | - . __( |
|
50 | - 'Add-ons', |
|
51 | - 'event_espresso' |
|
52 | - ) . '</a>'; ?><br/> |
|
44 | + . __( |
|
45 | + 'Plugins', |
|
46 | + 'event_espresso' |
|
47 | + ) |
|
48 | + . '</a> & <a href="http://eventespresso.com/add-ons/" target="_blank">' |
|
49 | + . __( |
|
50 | + 'Add-ons', |
|
51 | + 'event_espresso' |
|
52 | + ) . '</a>'; ?><br/> |
|
53 | 53 | <br/> |
54 | 54 | <ol> |
55 | 55 | <li> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | . __( |
12 | 12 | 'Usage Guide', |
13 | 13 | 'event_espresso' |
14 | - ) . '</a>'; ?> |
|
14 | + ).'</a>'; ?> |
|
15 | 15 | </li> |
16 | 16 | <li> |
17 | 17 | <a href="http://eventespresso.com/wiki/put-custom-templates/" target="_blank"> |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | . __( |
50 | 50 | 'Add-ons', |
51 | 51 | 'event_espresso' |
52 | - ) . '</a>'; ?><br/> |
|
52 | + ).'</a>'; ?><br/> |
|
53 | 53 | <br/> |
54 | 54 | <ol> |
55 | 55 | <li> |
@@ -7,7 +7,7 @@ |
||
7 | 7 | <option<?php selected($cur_status, $status); ?> |
8 | 8 | value='<?php echo $status; ?>'><?php echo $label; ?></option> |
9 | 9 | <?php |
10 | - endforeach; |
|
11 | - ?> |
|
10 | + endforeach; |
|
11 | + ?> |
|
12 | 12 | </select> |
13 | 13 | </div> |
14 | 14 | \ No newline at end of file |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | // action for registering metaboxes |
7 | 7 | do_action('add_meta_boxes', $post_type, $post); |
8 | 8 | ?> |
9 | -<?php if (! empty($admin_page_header)) : ?> |
|
9 | +<?php if ( ! empty($admin_page_header)) : ?> |
|
10 | 10 | <div id="admin-page-header"> |
11 | 11 | <?php echo $admin_page_header; ?> |
12 | 12 | </div> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | <!-- admin-page-header --> |
16 | 16 | <div id="post-body" class="metabox-holder columns-2"> |
17 | 17 | |
18 | - <?php if (! empty($post_body_content)) : ?> |
|
18 | + <?php if ( ! empty($post_body_content)) : ?> |
|
19 | 19 | <div id="post-body-content"> |
20 | 20 | <?php echo $post_body_content; ?> |
21 | 21 | </div> |
@@ -3,11 +3,11 @@ |
||
3 | 3 | |
4 | 4 | <div class="ee-notices"><?php echo isset($ajax_notices) ? $ajax_notices : ''; ?></div> |
5 | 5 | <?php |
6 | - do_action('AHEE__admin_wrapper__template__before_admin_page_content'); |
|
7 | - echo $before_admin_page_content; |
|
8 | - echo $admin_page_content; |
|
9 | - echo $after_admin_page_content; |
|
10 | - do_action('AHEE__admin_wrapper__template__after_admin_page_content'); |
|
11 | - ?> |
|
6 | + do_action('AHEE__admin_wrapper__template__before_admin_page_content'); |
|
7 | + echo $before_admin_page_content; |
|
8 | + echo $admin_page_content; |
|
9 | + echo $after_admin_page_content; |
|
10 | + do_action('AHEE__admin_wrapper__template__after_admin_page_content'); |
|
11 | + ?> |
|
12 | 12 | </div> |
13 | 13 | <!-- espresso-admin --> |
14 | 14 | \ No newline at end of file |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <div class="padding"> |
2 | 2 | <p><?php |
3 | - _e( |
|
4 | - 'We need your help to continue maintaining and providing this plugin for free. You can help by leaving a positive review in the WordPress plugin directory. 5 star ratings bring Event Espresso Decaf to the attention of more users which increases our support and features for this version of Event Espresso.', |
|
5 | - 'event_espresso' |
|
6 | - ); ?></p> |
|
3 | + _e( |
|
4 | + 'We need your help to continue maintaining and providing this plugin for free. You can help by leaving a positive review in the WordPress plugin directory. 5 star ratings bring Event Espresso Decaf to the attention of more users which increases our support and features for this version of Event Espresso.', |
|
5 | + 'event_espresso' |
|
6 | + ); ?></p> |
|
7 | 7 | <p><?php _e('Rate it five stars today!', 'event_espresso'); ?></p><span |
8 | 8 | class="ee-wp-blue dashicons dashicons-star-filled"></span><span |
9 | 9 | class="ee-wp-blue dashicons dashicons-star-filled"></span><span |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | class="ee-wp-blue dashicons dashicons-star-filled"></span> |
13 | 13 | <p><a class="button button-primary" |
14 | 14 | href="https://events.codebasehq.com/redirect?https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Fview%2Fplugin-reviews%2Fevent-espresso-decaf%3Frate%3D5%23postform"><?php |
15 | - _e( |
|
16 | - 'Rate It!', |
|
17 | - 'event_espresso' |
|
18 | - ); ?></a></p> |
|
15 | + _e( |
|
16 | + 'Rate It!', |
|
17 | + 'event_espresso' |
|
18 | + ); ?></a></p> |
|
19 | 19 | </div> |
20 | 20 | \ No newline at end of file |
@@ -7,7 +7,7 @@ |
||
7 | 7 | <div id="<?php echo $admin_page_wrapper_div_id; ?>"> |
8 | 8 | <div id="post-body" class="metabox-holder columns-1"> |
9 | 9 | |
10 | - <?php if (! empty($admin_page_header)) : ?> |
|
10 | + <?php if ( ! empty($admin_page_header)) : ?> |
|
11 | 11 | <div id="admin-page-header"> |
12 | 12 | <?php echo $admin_page_header; ?> |
13 | 13 | </div> |
@@ -32,126 +32,126 @@ |
||
32 | 32 | class EEE_Base_Class |
33 | 33 | { |
34 | 34 | |
35 | - const extending_method_prefix = 'ext_'; |
|
36 | - const dynamic_callback_method_prefix = 'dynamic_callback_method_'; |
|
37 | - /** |
|
38 | - * The model name that is extended (not classname) |
|
39 | - * |
|
40 | - * @var string |
|
41 | - */ |
|
42 | - protected $_model_name_extended = null; |
|
43 | - /** |
|
44 | - * The model this extends |
|
45 | - * |
|
46 | - * @var EE_Base_Class |
|
47 | - */ |
|
48 | - protected $_ = null; |
|
35 | + const extending_method_prefix = 'ext_'; |
|
36 | + const dynamic_callback_method_prefix = 'dynamic_callback_method_'; |
|
37 | + /** |
|
38 | + * The model name that is extended (not classname) |
|
39 | + * |
|
40 | + * @var string |
|
41 | + */ |
|
42 | + protected $_model_name_extended = null; |
|
43 | + /** |
|
44 | + * The model this extends |
|
45 | + * |
|
46 | + * @var EE_Base_Class |
|
47 | + */ |
|
48 | + protected $_ = null; |
|
49 | 49 | |
50 | - public function __construct() |
|
51 | - { |
|
52 | - if (! $this->_model_name_extended) { |
|
53 | - throw new EE_Error( |
|
54 | - sprintf( |
|
55 | - __( |
|
56 | - "When declaring a class extension, you must define its _model_name_extended property. It should be a model name like 'Attendee' or 'Event'", |
|
57 | - "event_espresso" |
|
58 | - ) |
|
59 | - ) |
|
60 | - ); |
|
61 | - } |
|
62 | - if (did_action('AHEE__EE_' . $this->_model_name_extended . '__construct__end')) { |
|
63 | - throw new EE_Error( |
|
64 | - sprintf( |
|
65 | - __( |
|
66 | - "Hooked in model object extension '%s' too late! The model object %s has already been used!", |
|
67 | - "event_espresso" |
|
68 | - ), |
|
69 | - get_class($this), |
|
70 | - $this->_model_name_extended |
|
71 | - ) |
|
72 | - ); |
|
73 | - } |
|
74 | - $this->_register_extending_methods(); |
|
75 | - } |
|
50 | + public function __construct() |
|
51 | + { |
|
52 | + if (! $this->_model_name_extended) { |
|
53 | + throw new EE_Error( |
|
54 | + sprintf( |
|
55 | + __( |
|
56 | + "When declaring a class extension, you must define its _model_name_extended property. It should be a model name like 'Attendee' or 'Event'", |
|
57 | + "event_espresso" |
|
58 | + ) |
|
59 | + ) |
|
60 | + ); |
|
61 | + } |
|
62 | + if (did_action('AHEE__EE_' . $this->_model_name_extended . '__construct__end')) { |
|
63 | + throw new EE_Error( |
|
64 | + sprintf( |
|
65 | + __( |
|
66 | + "Hooked in model object extension '%s' too late! The model object %s has already been used!", |
|
67 | + "event_espresso" |
|
68 | + ), |
|
69 | + get_class($this), |
|
70 | + $this->_model_name_extended |
|
71 | + ) |
|
72 | + ); |
|
73 | + } |
|
74 | + $this->_register_extending_methods(); |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * scans the child of EEME_Base for functions starting with ext_, and magically makes them functions on the |
|
79 | - * model extended. (Internally uses filters, and the __call magic method) |
|
80 | - */ |
|
81 | - protected function _register_extending_methods() |
|
82 | - { |
|
83 | - $all_methods = get_class_methods(get_class($this)); |
|
84 | - foreach ($all_methods as $method_name) { |
|
85 | - if (strpos($method_name, self::extending_method_prefix) === 0) { |
|
86 | - $method_name_on_model = str_replace(self::extending_method_prefix, '', $method_name); |
|
87 | - $callback_name = "FHEE__EE_{$this->_model_name_extended}__$method_name_on_model"; |
|
88 | - add_filter( |
|
89 | - $callback_name, |
|
90 | - array($this, self::dynamic_callback_method_prefix . $method_name_on_model), |
|
91 | - 10, |
|
92 | - 10 |
|
93 | - ); |
|
94 | - } |
|
95 | - } |
|
96 | - } |
|
77 | + /** |
|
78 | + * scans the child of EEME_Base for functions starting with ext_, and magically makes them functions on the |
|
79 | + * model extended. (Internally uses filters, and the __call magic method) |
|
80 | + */ |
|
81 | + protected function _register_extending_methods() |
|
82 | + { |
|
83 | + $all_methods = get_class_methods(get_class($this)); |
|
84 | + foreach ($all_methods as $method_name) { |
|
85 | + if (strpos($method_name, self::extending_method_prefix) === 0) { |
|
86 | + $method_name_on_model = str_replace(self::extending_method_prefix, '', $method_name); |
|
87 | + $callback_name = "FHEE__EE_{$this->_model_name_extended}__$method_name_on_model"; |
|
88 | + add_filter( |
|
89 | + $callback_name, |
|
90 | + array($this, self::dynamic_callback_method_prefix . $method_name_on_model), |
|
91 | + 10, |
|
92 | + 10 |
|
93 | + ); |
|
94 | + } |
|
95 | + } |
|
96 | + } |
|
97 | 97 | |
98 | - /** |
|
99 | - * scans the child of EEME_Base for functions starting with ext_, and magically REMOVES them as functions on the |
|
100 | - * model extended. (Internally uses filters, and the __call magic method) |
|
101 | - */ |
|
102 | - public function deregister() |
|
103 | - { |
|
104 | - $all_methods = get_class_methods(get_class($this)); |
|
105 | - foreach ($all_methods as $method_name) { |
|
106 | - if (strpos($method_name, self::extending_method_prefix) === 0) { |
|
107 | - $method_name_on_model = str_replace(self::extending_method_prefix, '', $method_name); |
|
108 | - $callback_name = "FHEE__EE_{$this->_model_name_extended}__$method_name_on_model"; |
|
109 | - remove_filter( |
|
110 | - $callback_name, |
|
111 | - array($this, self::dynamic_callback_method_prefix . $method_name_on_model), |
|
112 | - 10 |
|
113 | - ); |
|
114 | - } |
|
115 | - } |
|
116 | - } |
|
98 | + /** |
|
99 | + * scans the child of EEME_Base for functions starting with ext_, and magically REMOVES them as functions on the |
|
100 | + * model extended. (Internally uses filters, and the __call magic method) |
|
101 | + */ |
|
102 | + public function deregister() |
|
103 | + { |
|
104 | + $all_methods = get_class_methods(get_class($this)); |
|
105 | + foreach ($all_methods as $method_name) { |
|
106 | + if (strpos($method_name, self::extending_method_prefix) === 0) { |
|
107 | + $method_name_on_model = str_replace(self::extending_method_prefix, '', $method_name); |
|
108 | + $callback_name = "FHEE__EE_{$this->_model_name_extended}__$method_name_on_model"; |
|
109 | + remove_filter( |
|
110 | + $callback_name, |
|
111 | + array($this, self::dynamic_callback_method_prefix . $method_name_on_model), |
|
112 | + 10 |
|
113 | + ); |
|
114 | + } |
|
115 | + } |
|
116 | + } |
|
117 | 117 | |
118 | 118 | |
119 | - public function __call($callback_method_name, $args) |
|
120 | - { |
|
121 | - if (strpos($callback_method_name, self::dynamic_callback_method_prefix) === 0) { |
|
122 | - // it's a dynamic callback for a method name |
|
123 | - $method_called_on_model = str_replace(self::dynamic_callback_method_prefix, '', $callback_method_name); |
|
124 | - $original_return_val = $args[0]; |
|
125 | - $model_called = $args[1]; |
|
126 | - // phpcs:disable WordPress.WP.I18n.SingleUnderscoreGetTextFunction |
|
127 | - $this->_ = $model_called; |
|
128 | - // phpcs:enable |
|
129 | - $args_provided_to_method_on_model = $args[2]; |
|
130 | - $extending_method = self::extending_method_prefix . $method_called_on_model; |
|
131 | - if (method_exists($this, $extending_method)) { |
|
132 | - return call_user_func_array(array($this, $extending_method), $args_provided_to_method_on_model); |
|
133 | - } else { |
|
134 | - throw new EE_Error( |
|
135 | - sprintf( |
|
136 | - __( |
|
137 | - "An odd error occurred. Model '%s' had a method called on it that it didn't recognize. So it passed it onto the model extension '%s' (because it had a function named '%s' which should be able to handle it), but the function '%s' doesnt exist!)", |
|
138 | - "event_espresso" |
|
139 | - ), |
|
140 | - $this->_model_name_extended, |
|
141 | - get_class($this), |
|
142 | - $extending_method, |
|
143 | - $extending_method |
|
144 | - ) |
|
145 | - ); |
|
146 | - } |
|
147 | - } else { |
|
148 | - throw new EE_Error( |
|
149 | - sprintf( |
|
150 | - __("There is no method named '%s' on '%s'", "event_espresso"), |
|
151 | - $callback_method_name, |
|
152 | - get_class($this) |
|
153 | - ) |
|
154 | - ); |
|
155 | - } |
|
156 | - } |
|
119 | + public function __call($callback_method_name, $args) |
|
120 | + { |
|
121 | + if (strpos($callback_method_name, self::dynamic_callback_method_prefix) === 0) { |
|
122 | + // it's a dynamic callback for a method name |
|
123 | + $method_called_on_model = str_replace(self::dynamic_callback_method_prefix, '', $callback_method_name); |
|
124 | + $original_return_val = $args[0]; |
|
125 | + $model_called = $args[1]; |
|
126 | + // phpcs:disable WordPress.WP.I18n.SingleUnderscoreGetTextFunction |
|
127 | + $this->_ = $model_called; |
|
128 | + // phpcs:enable |
|
129 | + $args_provided_to_method_on_model = $args[2]; |
|
130 | + $extending_method = self::extending_method_prefix . $method_called_on_model; |
|
131 | + if (method_exists($this, $extending_method)) { |
|
132 | + return call_user_func_array(array($this, $extending_method), $args_provided_to_method_on_model); |
|
133 | + } else { |
|
134 | + throw new EE_Error( |
|
135 | + sprintf( |
|
136 | + __( |
|
137 | + "An odd error occurred. Model '%s' had a method called on it that it didn't recognize. So it passed it onto the model extension '%s' (because it had a function named '%s' which should be able to handle it), but the function '%s' doesnt exist!)", |
|
138 | + "event_espresso" |
|
139 | + ), |
|
140 | + $this->_model_name_extended, |
|
141 | + get_class($this), |
|
142 | + $extending_method, |
|
143 | + $extending_method |
|
144 | + ) |
|
145 | + ); |
|
146 | + } |
|
147 | + } else { |
|
148 | + throw new EE_Error( |
|
149 | + sprintf( |
|
150 | + __("There is no method named '%s' on '%s'", "event_espresso"), |
|
151 | + $callback_method_name, |
|
152 | + get_class($this) |
|
153 | + ) |
|
154 | + ); |
|
155 | + } |
|
156 | + } |
|
157 | 157 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function __construct() |
51 | 51 | { |
52 | - if (! $this->_model_name_extended) { |
|
52 | + if ( ! $this->_model_name_extended) { |
|
53 | 53 | throw new EE_Error( |
54 | 54 | sprintf( |
55 | 55 | __( |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ) |
60 | 60 | ); |
61 | 61 | } |
62 | - if (did_action('AHEE__EE_' . $this->_model_name_extended . '__construct__end')) { |
|
62 | + if (did_action('AHEE__EE_'.$this->_model_name_extended.'__construct__end')) { |
|
63 | 63 | throw new EE_Error( |
64 | 64 | sprintf( |
65 | 65 | __( |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $callback_name = "FHEE__EE_{$this->_model_name_extended}__$method_name_on_model"; |
88 | 88 | add_filter( |
89 | 89 | $callback_name, |
90 | - array($this, self::dynamic_callback_method_prefix . $method_name_on_model), |
|
90 | + array($this, self::dynamic_callback_method_prefix.$method_name_on_model), |
|
91 | 91 | 10, |
92 | 92 | 10 |
93 | 93 | ); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $callback_name = "FHEE__EE_{$this->_model_name_extended}__$method_name_on_model"; |
109 | 109 | remove_filter( |
110 | 110 | $callback_name, |
111 | - array($this, self::dynamic_callback_method_prefix . $method_name_on_model), |
|
111 | + array($this, self::dynamic_callback_method_prefix.$method_name_on_model), |
|
112 | 112 | 10 |
113 | 113 | ); |
114 | 114 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $this->_ = $model_called; |
128 | 128 | // phpcs:enable |
129 | 129 | $args_provided_to_method_on_model = $args[2]; |
130 | - $extending_method = self::extending_method_prefix . $method_called_on_model; |
|
130 | + $extending_method = self::extending_method_prefix.$method_called_on_model; |
|
131 | 131 | if (method_exists($this, $extending_method)) { |
132 | 132 | return call_user_func_array(array($this, $extending_method), $args_provided_to_method_on_model); |
133 | 133 | } else { |