@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <tr> |
3 | 3 | <td valign="top"> |
4 | 4 | <fieldset> |
5 | - <?php if( isset( EE_Registry::instance()->CFG->map_settings ) && isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) && EE_Registry::instance()->CFG->map_settings->use_google_maps ) { ?> |
|
5 | + <?php if (isset(EE_Registry::instance()->CFG->map_settings) && isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) && EE_Registry::instance()->CFG->map_settings->use_google_maps) { ?> |
|
6 | 6 | <p> |
7 | 7 | <label for="enable_for_gmap"> |
8 | 8 | <?php _e('Display Google Map for this venue? ', 'event_espresso') ?> |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | <input type="text" name="vnu_google_map_link" value="<?php echo $vnu_google_map_link; ?>" class="all-options" /> |
15 | 15 | </p> --> |
16 | 16 | <?php } ?> |
17 | - <?php if( ! isset( EE_Registry::instance()->CFG->map_settings ) || ! isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) || ! EE_Registry::instance()->CFG->map_settings->use_google_maps ) { ?> |
|
17 | + <?php if ( ! isset(EE_Registry::instance()->CFG->map_settings) || ! isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) || ! EE_Registry::instance()->CFG->map_settings->use_google_maps) { ?> |
|
18 | 18 | <p class="ee-notice"> |
19 | 19 | <?php |
20 | 20 | echo sprintf( |
21 | - __('To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', 'event_espresso' ), |
|
21 | + __('To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', 'event_espresso'), |
|
22 | 22 | '<b>', |
23 | 23 | '</b> » <b>', |
24 | 24 | '</b>' |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php if (!defined('EVENT_ESPRESSO_VERSION')) |
2 | 2 | exit('No direct script access allowed'); |
3 | 3 | /** |
4 | - * mijireh_settings_after_form |
|
5 | - * |
|
6 | - * @package Event Espresso |
|
7 | - * @subpackage |
|
8 | - * @author Mike Nelson |
|
9 | - */ |
|
4 | + * mijireh_settings_after_form |
|
5 | + * |
|
6 | + * @package Event Espresso |
|
7 | + * @subpackage |
|
8 | + * @author Mike Nelson |
|
9 | + */ |
|
10 | 10 | do_action('AHEE__EE_Mijireh__settings_end'); |
11 | 11 | ?><br/><?php |
12 | 12 | // End of file mijireh_settings_after_form.template.php |
13 | 13 | \ No newline at end of file |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if (!defined('EVENT_ESPRESSO_VERSION')) |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
2 | 2 | exit('No direct script access allowed'); |
3 | 3 | /** |
4 | 4 | * mijireh_settings_after_form |
@@ -1,5 +1,6 @@ |
||
1 | -<?php if (!defined('EVENT_ESPRESSO_VERSION')) |
|
1 | +<?php if (!defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | 2 | exit('No direct script access allowed'); |
3 | +} |
|
3 | 4 | /** |
4 | 5 | * mijireh_settings_after_form |
5 | 6 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | -<?php if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
2 | - exit( 'No direct script access allowed' ); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | 3 | } |
4 | 4 | /** |
5 | 5 | * Event Espresso |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | * @param array $props_n_values |
31 | 31 | * @return EE_Post_Meta|mixed |
32 | 32 | */ |
33 | - public static function new_instance( $props_n_values = array() ) { |
|
34 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
35 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
33 | + public static function new_instance($props_n_values = array()) { |
|
34 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
35 | + return $has_object ? $has_object : new self($props_n_values); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | * @param array $props_n_values |
42 | 42 | * @return EE_Post_Meta |
43 | 43 | */ |
44 | - public static function new_instance_from_db( $props_n_values = array() ) { |
|
45 | - return new self( $props_n_values, TRUE ); |
|
44 | + public static function new_instance_from_db($props_n_values = array()) { |
|
45 | + return new self($props_n_values, TRUE); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @return int |
53 | 53 | */ |
54 | 54 | function meta_id() { |
55 | - return $this->get( 'meta_id' ); |
|
55 | + return $this->get('meta_id'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -62,15 +62,15 @@ discard block |
||
62 | 62 | * @param int $meta_id |
63 | 63 | * @return boolean |
64 | 64 | */ |
65 | - function set_meta_id( $meta_id) { |
|
66 | - return $this->set( 'meta_id', $meta_id); |
|
65 | + function set_meta_id($meta_id) { |
|
66 | + return $this->set('meta_id', $meta_id); |
|
67 | 67 | } |
68 | 68 | /** |
69 | 69 | * Gets post_id |
70 | 70 | * @return int |
71 | 71 | */ |
72 | 72 | function post_id() { |
73 | - return $this->get( 'post_id' ); |
|
73 | + return $this->get('post_id'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | * @param int $post_id |
81 | 81 | * @return boolean |
82 | 82 | */ |
83 | - function set_post_id( $post_id) { |
|
84 | - return $this->set( 'post_id', $post_id); |
|
83 | + function set_post_id($post_id) { |
|
84 | + return $this->set('post_id', $post_id); |
|
85 | 85 | } |
86 | 86 | /** |
87 | 87 | * Gets meta_key |
88 | 88 | * @return string |
89 | 89 | */ |
90 | 90 | function meta_key() { |
91 | - return $this->get( 'meta_key' ); |
|
91 | + return $this->get('meta_key'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -98,15 +98,15 @@ discard block |
||
98 | 98 | * @param string $meta_key |
99 | 99 | * @return boolean |
100 | 100 | */ |
101 | - function set_meta_key( $meta_key) { |
|
102 | - return $this->set( 'meta_key', $meta_key); |
|
101 | + function set_meta_key($meta_key) { |
|
102 | + return $this->set('meta_key', $meta_key); |
|
103 | 103 | } |
104 | 104 | /** |
105 | 105 | * Gets meta_value |
106 | 106 | * @return mixed |
107 | 107 | */ |
108 | 108 | function meta_value() { |
109 | - return $this->get( 'meta_value' ); |
|
109 | + return $this->get('meta_value'); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | |
@@ -116,8 +116,8 @@ discard block |
||
116 | 116 | * @param mixed $meta_value |
117 | 117 | * @return boolean |
118 | 118 | */ |
119 | - function set_meta_value( $meta_value) { |
|
120 | - return $this->set( 'meta_value', $meta_value); |
|
119 | + function set_meta_value($meta_value) { |
|
120 | + return $this->set('meta_value', $meta_value); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * Sets meta_id |
62 | 62 | * @param int $meta_id |
63 | - * @return boolean |
|
63 | + * @return boolean|null |
|
64 | 64 | */ |
65 | 65 | function set_meta_id( $meta_id) { |
66 | 66 | return $this->set( 'meta_id', $meta_id); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * Sets post_id |
80 | 80 | * @param int $post_id |
81 | - * @return boolean |
|
81 | + * @return boolean|null |
|
82 | 82 | */ |
83 | 83 | function set_post_id( $post_id) { |
84 | 84 | return $this->set( 'post_id', $post_id); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | /** |
97 | 97 | * Sets meta_key |
98 | 98 | * @param string $meta_key |
99 | - * @return boolean |
|
99 | + * @return boolean|null |
|
100 | 100 | */ |
101 | 101 | function set_meta_key( $meta_key) { |
102 | 102 | return $this->set( 'meta_key', $meta_key); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * Sets meta_value |
116 | 116 | * @param mixed $meta_value |
117 | - * @return boolean |
|
117 | + * @return boolean|null |
|
118 | 118 | */ |
119 | 119 | function set_meta_value( $meta_value) { |
120 | 120 | return $this->set( 'meta_value', $meta_value); |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Event Espresso |
4 | 6 | * |
@@ -90,7 +92,7 @@ discard block |
||
90 | 92 | if( $answer_obj instanceof EE_Answer ){ |
91 | 93 | if($pretty_answer){ |
92 | 94 | $value = $answer_obj->pretty_value(); |
93 | - }else{ |
|
95 | + } else{ |
|
94 | 96 | $value = $answer_obj->value(); |
95 | 97 | } |
96 | 98 | } |
@@ -148,7 +150,7 @@ discard block |
||
148 | 150 | $value = $registration->attendee()->get_pretty( $field_name ); |
149 | 151 | } |
150 | 152 | //if field name is blank, leave the value as null too |
151 | - }else{ |
|
153 | + } else{ |
|
152 | 154 | $value = $registration->attendee()->get( $field_name ); |
153 | 155 | } |
154 | 156 | } |
@@ -125,14 +125,14 @@ |
||
125 | 125 | public function get_attendee_property_answer_value( EE_Registration $registration, $question_system_id = NULL, $pretty_answer = FALSE ){ |
126 | 126 | $field_name = NULL; |
127 | 127 | $value = NULL; |
128 | - //backward compat: we still want to find the question's ID |
|
129 | - if( is_numeric( $question_system_id ) ) { |
|
130 | - //find this question's QST_system value |
|
131 | - $question_id = $question_system_id; |
|
132 | - $question_system_id = EEM_Question::instance()->get_var( array( array( 'QST_ID' => $question_system_id ) ), 'QST_system' ); |
|
133 | - } else { |
|
134 | - $question_id = (int) EEM_Question::instance()->get_var( array( array( 'QST_system' => $question_system_id ) ), 'QST_ID' ); |
|
135 | - } |
|
128 | + //backward compat: we still want to find the question's ID |
|
129 | + if( is_numeric( $question_system_id ) ) { |
|
130 | + //find this question's QST_system value |
|
131 | + $question_id = $question_system_id; |
|
132 | + $question_system_id = EEM_Question::instance()->get_var( array( array( 'QST_ID' => $question_system_id ) ), 'QST_system' ); |
|
133 | + } else { |
|
134 | + $question_id = (int) EEM_Question::instance()->get_var( array( array( 'QST_system' => $question_system_id ) ), 'QST_ID' ); |
|
135 | + } |
|
136 | 136 | //only bother checking if the registration has an attendee |
137 | 137 | if( $registration->attendee() instanceof EE_Attendee ) { |
138 | 138 | $field_name = EEM_Attendee::instance()->get_attendee_field_for_system_question( $question_system_id ); |
@@ -51,18 +51,18 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * constructor |
53 | 53 | */ |
54 | - protected function __construct( $timezone = NULL ){ |
|
55 | - $this->singular_item = __('Answer','event_espresso'); |
|
56 | - $this->plural_item = __('Answers','event_espresso'); |
|
54 | + protected function __construct($timezone = NULL) { |
|
55 | + $this->singular_item = __('Answer', 'event_espresso'); |
|
56 | + $this->plural_item = __('Answers', 'event_espresso'); |
|
57 | 57 | $this->_tables = array( |
58 | 58 | 'Answer'=> new EE_Primary_Table('esp_answer', 'ANS_ID') |
59 | 59 | ); |
60 | 60 | $this->_fields = array( |
61 | 61 | 'Answer'=>array( |
62 | - 'ANS_ID'=> new EE_Primary_Key_Int_Field('ANS_ID', __('Answer ID','event_espresso')), |
|
63 | - 'REG_ID'=>new EE_Foreign_Key_Int_Field('REG_ID', __('Registration ID','event_espresso'), false, 0, 'Registration'), |
|
64 | - 'QST_ID'=>new EE_Foreign_Key_Int_Field('QST_ID', __('Question ID','event_espresso'), false, 0, 'Question'), |
|
65 | - 'ANS_value'=>new EE_Maybe_Serialized_Simple_HTML_Field('ANS_value', __('Answer Value','event_espresso'), false, '') |
|
62 | + 'ANS_ID'=> new EE_Primary_Key_Int_Field('ANS_ID', __('Answer ID', 'event_espresso')), |
|
63 | + 'REG_ID'=>new EE_Foreign_Key_Int_Field('REG_ID', __('Registration ID', 'event_espresso'), false, 0, 'Registration'), |
|
64 | + 'QST_ID'=>new EE_Foreign_Key_Int_Field('QST_ID', __('Question ID', 'event_espresso'), false, 0, 'Question'), |
|
65 | + 'ANS_value'=>new EE_Maybe_Serialized_Simple_HTML_Field('ANS_value', __('Answer Value', 'event_espresso'), false, '') |
|
66 | 66 | )); |
67 | 67 | $this->_model_relations = array( |
68 | 68 | 'Registration'=>new EE_Belongs_To_Relation(), |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ); |
71 | 71 | $this->_model_chain_to_wp_user = 'Registration.Event'; |
72 | 72 | $this->_caps_slug = 'registrations'; |
73 | - parent::__construct( $timezone ); |
|
73 | + parent::__construct($timezone); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | |
@@ -83,19 +83,19 @@ discard block |
||
83 | 83 | * @param boolean $pretty_answer whether to call 'pretty_value' or just 'value' |
84 | 84 | * @return string |
85 | 85 | */ |
86 | - public function get_answer_value_to_question( EE_Registration $registration, $question_id = NULL,$pretty_answer = FALSE ){ |
|
87 | - $value = $this->get_attendee_property_answer_value( $registration, $question_id, $pretty_answer ); |
|
88 | - if ( $value === NULL ){ |
|
89 | - $answer_obj = $this->get_registration_question_answer_object( $registration, $question_id); |
|
90 | - if( $answer_obj instanceof EE_Answer ){ |
|
91 | - if($pretty_answer){ |
|
86 | + public function get_answer_value_to_question(EE_Registration $registration, $question_id = NULL, $pretty_answer = FALSE) { |
|
87 | + $value = $this->get_attendee_property_answer_value($registration, $question_id, $pretty_answer); |
|
88 | + if ($value === NULL) { |
|
89 | + $answer_obj = $this->get_registration_question_answer_object($registration, $question_id); |
|
90 | + if ($answer_obj instanceof EE_Answer) { |
|
91 | + if ($pretty_answer) { |
|
92 | 92 | $value = $answer_obj->pretty_value(); |
93 | - }else{ |
|
93 | + } else { |
|
94 | 94 | $value = $answer_obj->value(); |
95 | 95 | } |
96 | 96 | } |
97 | 97 | } |
98 | - return apply_filters( 'FHEE__EEM_Answer__get_answer_value_to_question__answer_value', $value, $registration, $question_id ); |
|
98 | + return apply_filters('FHEE__EEM_Answer__get_answer_value_to_question__answer_value', $value, $registration, $question_id); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | * @param int $question_id |
107 | 107 | * @return EE_Answer |
108 | 108 | */ |
109 | - public function get_registration_question_answer_object( EE_Registration $registration, $question_id = NULL){ |
|
110 | - $answer_obj = $this->get_one( array( array( 'QST_ID'=>$question_id, 'REG_ID'=>$registration->ID() ))); |
|
111 | - return apply_filters( 'FHEE__EEM_Answer__get_registration_question_answer_object__answer_obj', $answer_obj, $registration, $question_id ); |
|
109 | + public function get_registration_question_answer_object(EE_Registration $registration, $question_id = NULL) { |
|
110 | + $answer_obj = $this->get_one(array(array('QST_ID'=>$question_id, 'REG_ID'=>$registration->ID()))); |
|
111 | + return apply_filters('FHEE__EEM_Answer__get_registration_question_answer_object__answer_obj', $answer_obj, $registration, $question_id); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | |
@@ -122,39 +122,39 @@ discard block |
||
122 | 122 | * @return string|null (if the registration has no attendee, or the question_system_id is not a QST_ID or QST_system for |
123 | 123 | * a question corresponding to an attendee field, returns null) |
124 | 124 | */ |
125 | - public function get_attendee_property_answer_value( EE_Registration $registration, $question_system_id = NULL, $pretty_answer = FALSE ){ |
|
125 | + public function get_attendee_property_answer_value(EE_Registration $registration, $question_system_id = NULL, $pretty_answer = FALSE) { |
|
126 | 126 | $field_name = NULL; |
127 | 127 | $value = NULL; |
128 | 128 | //backward compat: we still want to find the question's ID |
129 | - if( is_numeric( $question_system_id ) ) { |
|
129 | + if (is_numeric($question_system_id)) { |
|
130 | 130 | //find this question's QST_system value |
131 | 131 | $question_id = $question_system_id; |
132 | - $question_system_id = EEM_Question::instance()->get_var( array( array( 'QST_ID' => $question_system_id ) ), 'QST_system' ); |
|
132 | + $question_system_id = EEM_Question::instance()->get_var(array(array('QST_ID' => $question_system_id)), 'QST_system'); |
|
133 | 133 | } else { |
134 | - $question_id = (int) EEM_Question::instance()->get_var( array( array( 'QST_system' => $question_system_id ) ), 'QST_ID' ); |
|
134 | + $question_id = (int) EEM_Question::instance()->get_var(array(array('QST_system' => $question_system_id)), 'QST_ID'); |
|
135 | 135 | } |
136 | 136 | //only bother checking if the registration has an attendee |
137 | - if( $registration->attendee() instanceof EE_Attendee ) { |
|
138 | - $field_name = EEM_Attendee::instance()->get_attendee_field_for_system_question( $question_system_id ); |
|
139 | - if( $field_name ) { |
|
140 | - if( $pretty_answer ) { |
|
141 | - if( $field_name === 'STA_ID' ) { |
|
137 | + if ($registration->attendee() instanceof EE_Attendee) { |
|
138 | + $field_name = EEM_Attendee::instance()->get_attendee_field_for_system_question($question_system_id); |
|
139 | + if ($field_name) { |
|
140 | + if ($pretty_answer) { |
|
141 | + if ($field_name === 'STA_ID') { |
|
142 | 142 | $state = $registration->attendee()->state_obj(); |
143 | - $value = $state instanceof EE_State ? $state->name() : sprintf( __('Unknown State (%s)', 'event_espresso'), $registration->attendee()->state_ID() ); |
|
144 | - } else if($field_name === 'CNT_ISO') { |
|
143 | + $value = $state instanceof EE_State ? $state->name() : sprintf(__('Unknown State (%s)', 'event_espresso'), $registration->attendee()->state_ID()); |
|
144 | + } else if ($field_name === 'CNT_ISO') { |
|
145 | 145 | $country = $registration->attendee()->country_obj(); |
146 | - $value = $country instanceof EE_Country ? $country->name() : sprintf(__('Unknown Country (%s)', "event_espresso"),$registration->attendee()->country_ID()); |
|
146 | + $value = $country instanceof EE_Country ? $country->name() : sprintf(__('Unknown Country (%s)', "event_espresso"), $registration->attendee()->country_ID()); |
|
147 | 147 | } else { |
148 | - $value = $registration->attendee()->get_pretty( $field_name ); |
|
148 | + $value = $registration->attendee()->get_pretty($field_name); |
|
149 | 149 | } |
150 | 150 | //if field name is blank, leave the value as null too |
151 | - }else{ |
|
152 | - $value = $registration->attendee()->get( $field_name ); |
|
151 | + } else { |
|
152 | + $value = $registration->attendee()->get($field_name); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | //if no field was found, leave value blank |
156 | 156 | } |
157 | - return apply_filters( 'FHEE__EEM_Answer__get_attendee_question_answer_value__answer_value', $value, $registration, $question_id, $question_system_id ); |
|
157 | + return apply_filters('FHEE__EEM_Answer__get_attendee_question_answer_value__answer_value', $value, $registration, $question_id, $question_system_id); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /** |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * with the exception of a particular attribute |
27 | 27 | * @return object of the same class as what was called on |
28 | 28 | */ |
29 | - public function duplicate( $options = array() ); |
|
29 | + public function duplicate($options = array()); |
|
30 | 30 | |
31 | 31 | |
32 | 32 |
@@ -7,13 +7,13 @@ |
||
7 | 7 | <!-- Facebook sharing information tags --> |
8 | 8 | <meta property="og:title" content="<?php echo $subject; ?>" /> |
9 | 9 | <title><?php echo $subject; ?></title> |
10 | - <?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_head', $message_type, $subject, $from, $main_body ); ?> |
|
10 | + <?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_head', $message_type, $subject, $from, $main_body); ?> |
|
11 | 11 | </head> |
12 | -<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_header', $message_type, $subject, $from, $main_body ); ?> |
|
12 | +<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_header', $message_type, $subject, $from, $main_body); ?> |
|
13 | 13 | <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> |
14 | -<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_before_main_body', $message_type, $subject, $from, $main_body ); ?> |
|
14 | +<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_before_main_body', $message_type, $subject, $from, $main_body); ?> |
|
15 | 15 | <?php echo $main_body; ?> |
16 | -<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_after_main_body', $message_type, $subject, $from, $main_body ); ?> |
|
16 | +<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_after_main_body', $message_type, $subject, $from, $main_body); ?> |
|
17 | 17 | </body> |
18 | -<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_footer', $message_type, $subject, $from, $main_body ); ?> |
|
18 | +<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_footer', $message_type, $subject, $from, $main_body); ?> |
|
19 | 19 | </html> |
20 | 20 | \ No newline at end of file |
@@ -27,21 +27,21 @@ |
||
27 | 27 | <!-- Primary Style Sheet --> |
28 | 28 | <link rel="stylesheet" type="text/css" href="<?php echo $main_css; ?>" /> |
29 | 29 | <!-- Make sure the buttons don't print --> |
30 | - <?php if ( isset( $extra_css )) : ?> |
|
30 | + <?php if (isset($extra_css)) : ?> |
|
31 | 31 | <!-- Additional Style Sheet --> |
32 | 32 | <link rel="stylesheet" type="text/css" href="<?php echo $extra_css; ?>" /> |
33 | 33 | <?php endif; ?> |
34 | 34 | <style type="text/css"> |
35 | 35 | @media print{ .noPrint{ display:none !important;height:0!important; width:0!important; margin:0!important; padding:0!important; }} |
36 | 36 | </style> |
37 | - <?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_head', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
37 | + <?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_head', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
38 | 38 | </head> |
39 | - <?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_header', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
39 | + <?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_header', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
40 | 40 | <body> |
41 | - <?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_before_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
41 | + <?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_before_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
42 | 42 | <?php echo $main_body; ?> |
43 | - <?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_after_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
43 | + <?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_after_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
44 | 44 | </body> |
45 | - <?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_footer', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
45 | + <?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_footer', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?> |
|
46 | 46 | <?php wp_footer(); ?> |
47 | 47 | </html> |
48 | 48 | \ No newline at end of file |
@@ -123,7 +123,7 @@ |
||
123 | 123 | * @access public |
124 | 124 | * @param EE_Template_Config $CFG |
125 | 125 | * @param array $REQ |
126 | - * @return EE_Events_Archive_Config |
|
126 | + * @return EE_Template_Config |
|
127 | 127 | */ |
128 | 128 | public static function update_template_settings( $CFG, $REQ ) { |
129 | 129 | $config = new EE_Events_Archive_Config(); |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Event Espresso |
4 | 6 | * |
@@ -86,52 +86,52 @@ discard block |
||
86 | 86 | $gen_set_admin = EE_Registry::instance()->LIB->EE_Admin_Page_Loader->get_admin_page_object( 'general_settings' ); |
87 | 87 | if ( $gen_set_admin instanceof General_Settings_Admin_Page ) { |
88 | 88 | remove_action( |
89 | - 'AHEE__template_settings__template__before_settings_form', |
|
90 | - array( $gen_set_admin, 'template_settings_caff_features' ), |
|
91 | - 100 |
|
92 | - ); |
|
89 | + 'AHEE__template_settings__template__before_settings_form', |
|
90 | + array( $gen_set_admin, 'template_settings_caff_features' ), |
|
91 | + 100 |
|
92 | + ); |
|
93 | 93 | } |
94 | 94 | // first just grab the template settings |
95 | 95 | $config = EE_Registry::instance()->CFG->template_settings; |
96 | 96 | // then if the Event Archive config is valid, use that, else create a new one |
97 | 97 | $config = isset( $config->EED_Events_Archive ) && $config->EED_Events_Archive instanceof EE_Events_Archive_Config |
98 | - ? $config->EED_Events_Archive |
|
99 | - : new EE_Events_Archive_Config(); |
|
98 | + ? $config->EED_Events_Archive |
|
99 | + : new EE_Events_Archive_Config(); |
|
100 | 100 | $config = apply_filters( 'FHEE__EED_Events_Archive__template_settings_form__event_list_config', $config ); |
101 | 101 | $config->display_status_banner = isset( $config->display_status_banner ) |
102 | - ? $config->display_status_banner |
|
103 | - : 0; |
|
102 | + ? $config->display_status_banner |
|
103 | + : 0; |
|
104 | 104 | $config->display_description = isset( $config->display_description ) |
105 | - ? $config->display_description |
|
106 | - : 1; |
|
105 | + ? $config->display_description |
|
106 | + : 1; |
|
107 | 107 | $config->display_ticket_selector = isset( $config->display_ticket_selector ) |
108 | - ? $config->display_ticket_selector |
|
109 | - : 0; |
|
108 | + ? $config->display_ticket_selector |
|
109 | + : 0; |
|
110 | 110 | $config->display_datetimes = isset( $config->display_datetimes ) |
111 | - ? $config->display_datetimes |
|
112 | - : 1; |
|
111 | + ? $config->display_datetimes |
|
112 | + : 1; |
|
113 | 113 | $config->display_venue = isset( $config->display_venue ) |
114 | - ? $config->display_venue |
|
115 | - : 0; |
|
114 | + ? $config->display_venue |
|
115 | + : 0; |
|
116 | 116 | $config->display_expired_events = isset( $config->display_expired_events ) |
117 | - ? $config->display_expired_events |
|
118 | - : 0; |
|
117 | + ? $config->display_expired_events |
|
118 | + : 0; |
|
119 | 119 | // display order options |
120 | 120 | $config->use_sortable_display_order = isset( $config->use_sortable_display_order ) |
121 | - ? $config->use_sortable_display_order |
|
122 | - : false; |
|
121 | + ? $config->use_sortable_display_order |
|
122 | + : false; |
|
123 | 123 | $config->display_order_tickets = isset( $config->display_order_tickets ) |
124 | - ? $config->display_order_tickets |
|
125 | - : 120; |
|
124 | + ? $config->display_order_tickets |
|
125 | + : 120; |
|
126 | 126 | $config->display_order_datetimes = isset( $config->display_order_datetimes ) |
127 | - ? $config->display_order_datetimes |
|
128 | - : 110; |
|
127 | + ? $config->display_order_datetimes |
|
128 | + : 110; |
|
129 | 129 | $config->display_order_event = isset( $config->display_order_event ) |
130 | - ? $config->display_order_event |
|
131 | - : 100; |
|
130 | + ? $config->display_order_event |
|
131 | + : 100; |
|
132 | 132 | $config->display_order_venue = isset( $config->display_order_venue ) |
133 | - ? $config->display_order_venue |
|
134 | - : 130; |
|
133 | + ? $config->display_order_venue |
|
134 | + : 130; |
|
135 | 135 | // get template parts |
136 | 136 | $template_parts = EED_Events_Archive::instance()->initialize_template_parts( $config ); |
137 | 137 | // convert to array so that we can add more properties |
@@ -165,17 +165,17 @@ discard block |
||
165 | 165 | $config->display_expired_events = isset( $REQ['EED_Events_Archive_display_expired_events'] ) ? absint( $REQ['EED_Events_Archive_display_expired_events'] ) : 0; |
166 | 166 | $config->use_sortable_display_order = isset( $REQ['EED_Events_Archive_use_sortable_display_order'] ) ? absint( $REQ['EED_Events_Archive_use_sortable_display_order'] ) : 0; |
167 | 167 | $config->display_order_event = isset( $CFG->EED_Events_Archive->display_order_event ) && $config->use_sortable_display_order |
168 | - ? $CFG->EED_Events_Archive->display_order_event |
|
169 | - : EED_Events_Archive::EVENT_DETAILS_PRIORITY; |
|
168 | + ? $CFG->EED_Events_Archive->display_order_event |
|
169 | + : EED_Events_Archive::EVENT_DETAILS_PRIORITY; |
|
170 | 170 | $config->display_order_datetimes = isset( $CFG->EED_Events_Archive->display_order_datetimes ) && $config->use_sortable_display_order |
171 | - ? $CFG->EED_Events_Archive->display_order_datetimes |
|
172 | - : EED_Events_Archive::EVENT_DATETIMES_PRIORITY; |
|
171 | + ? $CFG->EED_Events_Archive->display_order_datetimes |
|
172 | + : EED_Events_Archive::EVENT_DATETIMES_PRIORITY; |
|
173 | 173 | $config->display_order_tickets = isset( $CFG->EED_Events_Archive->display_order_tickets ) && $config->use_sortable_display_order |
174 | - ? $CFG->EED_Events_Archive->display_order_tickets |
|
175 | - : EED_Events_Archive::EVENT_TICKETS_PRIORITY; |
|
174 | + ? $CFG->EED_Events_Archive->display_order_tickets |
|
175 | + : EED_Events_Archive::EVENT_TICKETS_PRIORITY; |
|
176 | 176 | $config->display_order_venue = isset( $CFG->EED_Events_Archive->display_order_venue ) && $config->use_sortable_display_order |
177 | - ? $CFG->EED_Events_Archive->display_order_venue |
|
178 | - : EED_Events_Archive::EVENT_VENUES_PRIORITY; |
|
177 | + ? $CFG->EED_Events_Archive->display_order_venue |
|
178 | + : EED_Events_Archive::EVENT_VENUES_PRIORITY; |
|
179 | 179 | } |
180 | 180 | $CFG->EED_Events_Archive = $config; |
181 | 181 | do_action( 'AHEE__EED_Events_Archive__update_template_settings__after_update', $CFG, $REQ ); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @return EED_Events_Archive_Caff |
29 | 29 | */ |
30 | 30 | public static function instance() { |
31 | - return parent::get_instance( __CLASS__ ); |
|
31 | + return parent::get_instance(__CLASS__); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | * @return void |
50 | 50 | */ |
51 | 51 | public static function set_hooks_admin() { |
52 | - define( 'EVENTS_ARCHIVE_CAFF_TEMPLATES_PATH', str_replace( '\\', DS, plugin_dir_path( __FILE__ )) . 'templates' . DS ); |
|
53 | - define( 'EVENT_ARCHIVE_CAFF_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS ); |
|
54 | - add_action( 'AHEE__template_settings__template__before_settings_form', array( 'EED_Events_Archive_Caff', 'template_settings_form' ), 10 ); |
|
55 | - add_filter( 'FHEE__General_Settings_Admin_Page__update_template_settings__data', array( 'EED_Events_Archive_Caff', 'update_template_settings' ), 10, 2 ); |
|
52 | + define('EVENTS_ARCHIVE_CAFF_TEMPLATES_PATH', str_replace('\\', DS, plugin_dir_path(__FILE__)).'templates'.DS); |
|
53 | + define('EVENT_ARCHIVE_CAFF_ASSETS_URL', plugin_dir_url(__FILE__).'assets'.DS); |
|
54 | + add_action('AHEE__template_settings__template__before_settings_form', array('EED_Events_Archive_Caff', 'template_settings_form'), 10); |
|
55 | + add_filter('FHEE__General_Settings_Admin_Page__update_template_settings__data', array('EED_Events_Archive_Caff', 'update_template_settings'), 10, 2); |
|
56 | 56 | // AJAX |
57 | - add_action( 'wp_ajax_espresso_update_event_archive_order', array( 'EED_Events_Archive_Caff', 'update_event_archive_order' ) ); |
|
58 | - add_action( 'wp_ajax_nopriv_espresso_update_event_archive_order', array( 'EED_Events_Archive_Caff', 'update_event_archive_order' ) ); |
|
57 | + add_action('wp_ajax_espresso_update_event_archive_order', array('EED_Events_Archive_Caff', 'update_event_archive_order')); |
|
58 | + add_action('wp_ajax_nopriv_espresso_update_event_archive_order', array('EED_Events_Archive_Caff', 'update_event_archive_order')); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param WP $WP |
69 | 69 | * @return void |
70 | 70 | */ |
71 | - public function run( $WP ) { |
|
71 | + public function run($WP) { |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -83,61 +83,61 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public static function template_settings_form() { |
85 | 85 | // grab general settings admin page and remove the existing hook callback |
86 | - $gen_set_admin = EE_Registry::instance()->LIB->EE_Admin_Page_Loader->get_admin_page_object( 'general_settings' ); |
|
87 | - if ( $gen_set_admin instanceof General_Settings_Admin_Page ) { |
|
86 | + $gen_set_admin = EE_Registry::instance()->LIB->EE_Admin_Page_Loader->get_admin_page_object('general_settings'); |
|
87 | + if ($gen_set_admin instanceof General_Settings_Admin_Page) { |
|
88 | 88 | remove_action( |
89 | 89 | 'AHEE__template_settings__template__before_settings_form', |
90 | - array( $gen_set_admin, 'template_settings_caff_features' ), |
|
90 | + array($gen_set_admin, 'template_settings_caff_features'), |
|
91 | 91 | 100 |
92 | 92 | ); |
93 | 93 | } |
94 | 94 | // first just grab the template settings |
95 | 95 | $config = EE_Registry::instance()->CFG->template_settings; |
96 | 96 | // then if the Event Archive config is valid, use that, else create a new one |
97 | - $config = isset( $config->EED_Events_Archive ) && $config->EED_Events_Archive instanceof EE_Events_Archive_Config |
|
97 | + $config = isset($config->EED_Events_Archive) && $config->EED_Events_Archive instanceof EE_Events_Archive_Config |
|
98 | 98 | ? $config->EED_Events_Archive |
99 | 99 | : new EE_Events_Archive_Config(); |
100 | - $config = apply_filters( 'FHEE__EED_Events_Archive__template_settings_form__event_list_config', $config ); |
|
101 | - $config->display_status_banner = isset( $config->display_status_banner ) |
|
100 | + $config = apply_filters('FHEE__EED_Events_Archive__template_settings_form__event_list_config', $config); |
|
101 | + $config->display_status_banner = isset($config->display_status_banner) |
|
102 | 102 | ? $config->display_status_banner |
103 | 103 | : 0; |
104 | - $config->display_description = isset( $config->display_description ) |
|
104 | + $config->display_description = isset($config->display_description) |
|
105 | 105 | ? $config->display_description |
106 | 106 | : 1; |
107 | - $config->display_ticket_selector = isset( $config->display_ticket_selector ) |
|
107 | + $config->display_ticket_selector = isset($config->display_ticket_selector) |
|
108 | 108 | ? $config->display_ticket_selector |
109 | 109 | : 0; |
110 | - $config->display_datetimes = isset( $config->display_datetimes ) |
|
110 | + $config->display_datetimes = isset($config->display_datetimes) |
|
111 | 111 | ? $config->display_datetimes |
112 | 112 | : 1; |
113 | - $config->display_venue = isset( $config->display_venue ) |
|
113 | + $config->display_venue = isset($config->display_venue) |
|
114 | 114 | ? $config->display_venue |
115 | 115 | : 0; |
116 | - $config->display_expired_events = isset( $config->display_expired_events ) |
|
116 | + $config->display_expired_events = isset($config->display_expired_events) |
|
117 | 117 | ? $config->display_expired_events |
118 | 118 | : 0; |
119 | 119 | // display order options |
120 | - $config->use_sortable_display_order = isset( $config->use_sortable_display_order ) |
|
120 | + $config->use_sortable_display_order = isset($config->use_sortable_display_order) |
|
121 | 121 | ? $config->use_sortable_display_order |
122 | 122 | : false; |
123 | - $config->display_order_tickets = isset( $config->display_order_tickets ) |
|
123 | + $config->display_order_tickets = isset($config->display_order_tickets) |
|
124 | 124 | ? $config->display_order_tickets |
125 | 125 | : 120; |
126 | - $config->display_order_datetimes = isset( $config->display_order_datetimes ) |
|
126 | + $config->display_order_datetimes = isset($config->display_order_datetimes) |
|
127 | 127 | ? $config->display_order_datetimes |
128 | 128 | : 110; |
129 | - $config->display_order_event = isset( $config->display_order_event ) |
|
129 | + $config->display_order_event = isset($config->display_order_event) |
|
130 | 130 | ? $config->display_order_event |
131 | 131 | : 100; |
132 | - $config->display_order_venue = isset( $config->display_order_venue ) |
|
132 | + $config->display_order_venue = isset($config->display_order_venue) |
|
133 | 133 | ? $config->display_order_venue |
134 | 134 | : 130; |
135 | 135 | // get template parts |
136 | - $template_parts = EED_Events_Archive::instance()->initialize_template_parts( $config ); |
|
136 | + $template_parts = EED_Events_Archive::instance()->initialize_template_parts($config); |
|
137 | 137 | // convert to array so that we can add more properties |
138 | - $config = get_object_vars( $config ); |
|
139 | - $config[ 'event_archive_display_order' ] = $template_parts->generate_sortable_list_of_template_parts( 'event-archive-sortable-js', '', 'archive-sortable-li archive-sortable-js' ); |
|
140 | - EEH_Template::display_template( EVENTS_ARCHIVE_CAFF_TEMPLATES_PATH . 'admin-event-list-settings.template.php', $config ); |
|
138 | + $config = get_object_vars($config); |
|
139 | + $config['event_archive_display_order'] = $template_parts->generate_sortable_list_of_template_parts('event-archive-sortable-js', '', 'archive-sortable-li archive-sortable-js'); |
|
140 | + EEH_Template::display_template(EVENTS_ARCHIVE_CAFF_TEMPLATES_PATH.'admin-event-list-settings.template.php', $config); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | |
@@ -153,32 +153,32 @@ discard block |
||
153 | 153 | * @param array $REQ |
154 | 154 | * @return EE_Events_Archive_Config |
155 | 155 | */ |
156 | - public static function update_template_settings( $CFG, $REQ ) { |
|
156 | + public static function update_template_settings($CFG, $REQ) { |
|
157 | 157 | $config = new EE_Events_Archive_Config(); |
158 | 158 | // unless we are resetting the config... |
159 | - if ( ! isset( $REQ['EED_Events_Archive_reset_event_list_settings'] ) || absint( $REQ['EED_Events_Archive_reset_event_list_settings'] ) !== 1 ) { |
|
160 | - $config->display_status_banner = isset( $REQ['EED_Events_Archive_display_status_banner'] ) ? absint( $REQ['EED_Events_Archive_display_status_banner'] ) : 0; |
|
161 | - $config->display_description = isset( $REQ['EED_Events_Archive_display_description'] ) ? absint( $REQ['EED_Events_Archive_display_description'] ) : 1; |
|
162 | - $config->display_ticket_selector = isset( $REQ['EED_Events_Archive_display_ticket_selector'] ) ? absint( $REQ['EED_Events_Archive_display_ticket_selector'] ) : 0; |
|
163 | - $config->display_datetimes = isset( $REQ['EED_Events_Archive_display_datetimes'] ) ? absint( $REQ['EED_Events_Archive_display_datetimes'] ) : 1; |
|
164 | - $config->display_venue = isset( $REQ['EED_Events_Archive_display_venue'] ) ? absint( $REQ['EED_Events_Archive_display_venue'] ) : 0; |
|
165 | - $config->display_expired_events = isset( $REQ['EED_Events_Archive_display_expired_events'] ) ? absint( $REQ['EED_Events_Archive_display_expired_events'] ) : 0; |
|
166 | - $config->use_sortable_display_order = isset( $REQ['EED_Events_Archive_use_sortable_display_order'] ) ? absint( $REQ['EED_Events_Archive_use_sortable_display_order'] ) : 0; |
|
167 | - $config->display_order_event = isset( $CFG->EED_Events_Archive->display_order_event ) && $config->use_sortable_display_order |
|
159 | + if ( ! isset($REQ['EED_Events_Archive_reset_event_list_settings']) || absint($REQ['EED_Events_Archive_reset_event_list_settings']) !== 1) { |
|
160 | + $config->display_status_banner = isset($REQ['EED_Events_Archive_display_status_banner']) ? absint($REQ['EED_Events_Archive_display_status_banner']) : 0; |
|
161 | + $config->display_description = isset($REQ['EED_Events_Archive_display_description']) ? absint($REQ['EED_Events_Archive_display_description']) : 1; |
|
162 | + $config->display_ticket_selector = isset($REQ['EED_Events_Archive_display_ticket_selector']) ? absint($REQ['EED_Events_Archive_display_ticket_selector']) : 0; |
|
163 | + $config->display_datetimes = isset($REQ['EED_Events_Archive_display_datetimes']) ? absint($REQ['EED_Events_Archive_display_datetimes']) : 1; |
|
164 | + $config->display_venue = isset($REQ['EED_Events_Archive_display_venue']) ? absint($REQ['EED_Events_Archive_display_venue']) : 0; |
|
165 | + $config->display_expired_events = isset($REQ['EED_Events_Archive_display_expired_events']) ? absint($REQ['EED_Events_Archive_display_expired_events']) : 0; |
|
166 | + $config->use_sortable_display_order = isset($REQ['EED_Events_Archive_use_sortable_display_order']) ? absint($REQ['EED_Events_Archive_use_sortable_display_order']) : 0; |
|
167 | + $config->display_order_event = isset($CFG->EED_Events_Archive->display_order_event) && $config->use_sortable_display_order |
|
168 | 168 | ? $CFG->EED_Events_Archive->display_order_event |
169 | 169 | : EED_Events_Archive::EVENT_DETAILS_PRIORITY; |
170 | - $config->display_order_datetimes = isset( $CFG->EED_Events_Archive->display_order_datetimes ) && $config->use_sortable_display_order |
|
170 | + $config->display_order_datetimes = isset($CFG->EED_Events_Archive->display_order_datetimes) && $config->use_sortable_display_order |
|
171 | 171 | ? $CFG->EED_Events_Archive->display_order_datetimes |
172 | 172 | : EED_Events_Archive::EVENT_DATETIMES_PRIORITY; |
173 | - $config->display_order_tickets = isset( $CFG->EED_Events_Archive->display_order_tickets ) && $config->use_sortable_display_order |
|
173 | + $config->display_order_tickets = isset($CFG->EED_Events_Archive->display_order_tickets) && $config->use_sortable_display_order |
|
174 | 174 | ? $CFG->EED_Events_Archive->display_order_tickets |
175 | 175 | : EED_Events_Archive::EVENT_TICKETS_PRIORITY; |
176 | - $config->display_order_venue = isset( $CFG->EED_Events_Archive->display_order_venue ) && $config->use_sortable_display_order |
|
176 | + $config->display_order_venue = isset($CFG->EED_Events_Archive->display_order_venue) && $config->use_sortable_display_order |
|
177 | 177 | ? $CFG->EED_Events_Archive->display_order_venue |
178 | 178 | : EED_Events_Archive::EVENT_VENUES_PRIORITY; |
179 | 179 | } |
180 | 180 | $CFG->EED_Events_Archive = $config; |
181 | - do_action( 'AHEE__EED_Events_Archive__update_template_settings__after_update', $CFG, $REQ ); |
|
181 | + do_action('AHEE__EED_Events_Archive__update_template_settings__after_update', $CFG, $REQ); |
|
182 | 182 | return $CFG; |
183 | 183 | } |
184 | 184 | |
@@ -192,12 +192,12 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public static function update_event_archive_order() { |
194 | 194 | $config_saved = false; |
195 | - $template_parts = sanitize_text_field( $_POST[ 'elements' ] ); |
|
196 | - if ( ! empty( $template_parts ) ) { |
|
197 | - $template_parts = explode( ',', trim( $template_parts, ',' ) ); |
|
198 | - foreach ( $template_parts as $key => $template_part ) { |
|
195 | + $template_parts = sanitize_text_field($_POST['elements']); |
|
196 | + if ( ! empty($template_parts)) { |
|
197 | + $template_parts = explode(',', trim($template_parts, ',')); |
|
198 | + foreach ($template_parts as $key => $template_part) { |
|
199 | 199 | $template_part = "display_order_$template_part"; |
200 | - $priority = ( $key * 10 ) + EED_Events_Archive::EVENT_DETAILS_PRIORITY; |
|
200 | + $priority = ($key * 10) + EED_Events_Archive::EVENT_DETAILS_PRIORITY; |
|
201 | 201 | if ( |
202 | 202 | property_exists( |
203 | 203 | EE_Registry::instance()->CFG->template_settings->EED_Events_Archive, |
@@ -206,16 +206,16 @@ discard block |
||
206 | 206 | ) { |
207 | 207 | EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->{$template_part} = $priority; |
208 | 208 | } |
209 | - do_action( "AHEE__EED_Events_Archive__update_event_archive_order__$template_part", $priority ); |
|
209 | + do_action("AHEE__EED_Events_Archive__update_event_archive_order__$template_part", $priority); |
|
210 | 210 | } |
211 | - $config_saved = EE_Registry::instance()->CFG->update_espresso_config( false, false ); |
|
211 | + $config_saved = EE_Registry::instance()->CFG->update_espresso_config(false, false); |
|
212 | 212 | } |
213 | - if ( $config_saved ) { |
|
214 | - EE_Error::add_success( __( 'Display Order has been successfully updated.', 'event_espresso' ) ); |
|
213 | + if ($config_saved) { |
|
214 | + EE_Error::add_success(__('Display Order has been successfully updated.', 'event_espresso')); |
|
215 | 215 | } else { |
216 | - EE_Error::add_error( __( 'Display Order was not updated.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
216 | + EE_Error::add_error(__('Display Order was not updated.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
217 | 217 | } |
218 | - echo wp_json_encode( EE_Error::get_notices( false ) ); |
|
218 | + echo wp_json_encode(EE_Error::get_notices(false)); |
|
219 | 219 | exit(); |
220 | 220 | } |
221 | 221 |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | //namespace EventEspresso\core\libraries\templates; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | /** |
8 | 8 | * Class EE_Template_Part |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | * @param string $template |
48 | 48 | * @param int $priority |
49 | 49 | */ |
50 | - public function __construct( $name, $label, $template, $priority = 100 ) { |
|
51 | - $this->set_name( $name ); |
|
52 | - $this->set_label( $label ); |
|
53 | - $this->set_template( $template ); |
|
54 | - $this->set_priority( $priority ); |
|
50 | + public function __construct($name, $label, $template, $priority = 100) { |
|
51 | + $this->set_name($name); |
|
52 | + $this->set_label($label); |
|
53 | + $this->set_template($template); |
|
54 | + $this->set_priority($priority); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * @param mixed $name |
70 | 70 | */ |
71 | - public function set_name( $name ) { |
|
71 | + public function set_name($name) { |
|
72 | 72 | $this->name = $name; |
73 | 73 | } |
74 | 74 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | /** |
87 | 87 | * @param string $label |
88 | 88 | */ |
89 | - public function set_label( $label ) { |
|
89 | + public function set_label($label) { |
|
90 | 90 | $this->label = $label; |
91 | 91 | } |
92 | 92 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * @param string $template |
106 | 106 | */ |
107 | - public function set_template( $template ) { |
|
107 | + public function set_template($template) { |
|
108 | 108 | $this->template = $template; |
109 | 109 | } |
110 | 110 | |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | /** |
123 | 123 | * @param int $priority |
124 | 124 | */ |
125 | - public function set_priority( $priority ) { |
|
126 | - $this->priority = intval( $priority ); |
|
125 | + public function set_priority($priority) { |
|
126 | + $this->priority = intval($priority); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 |