@@ -15,31 +15,31 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - public function __construct($fields, $context) |
|
19 | - { |
|
20 | - $this->_m_name = 'email'; |
|
21 | - $this->_mt_name = 'declined_registration'; |
|
18 | + public function __construct($fields, $context) |
|
19 | + { |
|
20 | + $this->_m_name = 'email'; |
|
21 | + $this->_mt_name = 'declined_registration'; |
|
22 | 22 | |
23 | - parent::__construct($fields, $context); |
|
24 | - } |
|
23 | + parent::__construct($fields, $context); |
|
24 | + } |
|
25 | 25 | |
26 | - /** |
|
27 | - * custom validator (restricting what was originally set by the messenger) |
|
28 | - */ |
|
29 | - protected function _modify_validator() |
|
30 | - { |
|
31 | - $new_config = $this->_messenger->get_validator_config(); |
|
32 | - // modify just event_list |
|
33 | - $new_config['event_list'] = array( |
|
34 | - 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
|
35 | - 'required' => array('[EVENT_LIST]') |
|
36 | - ); |
|
37 | - $this->_messenger->set_validator_config($new_config); |
|
26 | + /** |
|
27 | + * custom validator (restricting what was originally set by the messenger) |
|
28 | + */ |
|
29 | + protected function _modify_validator() |
|
30 | + { |
|
31 | + $new_config = $this->_messenger->get_validator_config(); |
|
32 | + // modify just event_list |
|
33 | + $new_config['event_list'] = array( |
|
34 | + 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
|
35 | + 'required' => array('[EVENT_LIST]') |
|
36 | + ); |
|
37 | + $this->_messenger->set_validator_config($new_config); |
|
38 | 38 | |
39 | - if ($this->_context != 'admin') { |
|
40 | - $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
41 | - } |
|
39 | + if ($this->_context != 'admin') { |
|
40 | + $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
41 | + } |
|
42 | 42 | |
43 | - $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
|
44 | - } |
|
43 | + $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
|
44 | + } |
|
45 | 45 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $this->_messenger->set_validator_config($new_config); |
39 | 39 | |
40 | 40 | if ($this->_context != 'admin') { |
41 | - $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
41 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -15,47 +15,47 @@ |
||
15 | 15 | class EE_Declined_Registration_message_type extends EE_Registration_Base_message_type |
16 | 16 | { |
17 | 17 | |
18 | - public function __construct() |
|
19 | - { |
|
20 | - $this->name = 'declined_registration'; |
|
21 | - $this->description = __('This message type is for messages sent to registrants when their registration is declined.', 'event_espresso'); |
|
22 | - $this->label = array( |
|
23 | - 'singular' => __('registration declined', 'event_espresso'), |
|
24 | - 'plural' => __('registrations declined', 'event_espresso') |
|
25 | - ); |
|
26 | - $this->_master_templates = array( |
|
27 | - 'email' => 'not_approved_registration' |
|
28 | - ); |
|
29 | - parent::__construct(); |
|
30 | - } |
|
31 | - |
|
32 | - |
|
33 | - |
|
34 | - |
|
35 | - /** |
|
36 | - * _set_contexts |
|
37 | - * This sets up the contexts associated with the message_type |
|
38 | - * |
|
39 | - * @access protected |
|
40 | - * @return void |
|
41 | - */ |
|
42 | - protected function _set_contexts() |
|
43 | - { |
|
44 | - $this->_context_label = array( |
|
45 | - 'label' => __('recipient', 'event_espresso'), |
|
46 | - 'plural' => __('recipients', 'event_espresso'), |
|
47 | - 'description' => __('Recipient\'s are who will receive the template. You may want different registration details sent out depending on who the recipient is', 'event_espresso') |
|
48 | - ); |
|
49 | - |
|
50 | - $this->_contexts = array( |
|
51 | - 'admin' => array( |
|
52 | - 'label' => __('Event Admin', 'event_espresso'), |
|
53 | - 'description' => __('This template is what event administrators will receive with an declined registration', 'event_espresso') |
|
54 | - ), |
|
55 | - 'attendee' => array( |
|
56 | - 'label' => __('Registrant', 'event_espresso'), |
|
57 | - 'description' => __('This template is what each registrant for the event will receive when their registration is declined.', 'event_espresso') |
|
58 | - ) |
|
59 | - ); |
|
60 | - } |
|
18 | + public function __construct() |
|
19 | + { |
|
20 | + $this->name = 'declined_registration'; |
|
21 | + $this->description = __('This message type is for messages sent to registrants when their registration is declined.', 'event_espresso'); |
|
22 | + $this->label = array( |
|
23 | + 'singular' => __('registration declined', 'event_espresso'), |
|
24 | + 'plural' => __('registrations declined', 'event_espresso') |
|
25 | + ); |
|
26 | + $this->_master_templates = array( |
|
27 | + 'email' => 'not_approved_registration' |
|
28 | + ); |
|
29 | + parent::__construct(); |
|
30 | + } |
|
31 | + |
|
32 | + |
|
33 | + |
|
34 | + |
|
35 | + /** |
|
36 | + * _set_contexts |
|
37 | + * This sets up the contexts associated with the message_type |
|
38 | + * |
|
39 | + * @access protected |
|
40 | + * @return void |
|
41 | + */ |
|
42 | + protected function _set_contexts() |
|
43 | + { |
|
44 | + $this->_context_label = array( |
|
45 | + 'label' => __('recipient', 'event_espresso'), |
|
46 | + 'plural' => __('recipients', 'event_espresso'), |
|
47 | + 'description' => __('Recipient\'s are who will receive the template. You may want different registration details sent out depending on who the recipient is', 'event_espresso') |
|
48 | + ); |
|
49 | + |
|
50 | + $this->_contexts = array( |
|
51 | + 'admin' => array( |
|
52 | + 'label' => __('Event Admin', 'event_espresso'), |
|
53 | + 'description' => __('This template is what event administrators will receive with an declined registration', 'event_espresso') |
|
54 | + ), |
|
55 | + 'attendee' => array( |
|
56 | + 'label' => __('Registrant', 'event_espresso'), |
|
57 | + 'description' => __('This template is what each registrant for the event will receive when their registration is declined.', 'event_espresso') |
|
58 | + ) |
|
59 | + ); |
|
60 | + } |
|
61 | 61 | } |
@@ -15,49 +15,49 @@ |
||
15 | 15 | class EE_Payment_Reminder_message_type extends EE_Payment_Base_message_type |
16 | 16 | { |
17 | 17 | |
18 | - public function __construct() |
|
19 | - { |
|
20 | - |
|
21 | - // setup type details for reference |
|
22 | - $this->name = 'payment_reminder'; |
|
23 | - $this->description = __('This message type is used for all payment reminder messages. These are triggered when an offline gateway registration is completed or when manually triggered via event administrators via the transaction admin page(s).', 'event_espresso'); |
|
24 | - $this->label = array( |
|
25 | - 'singular' => __('payment reminder', 'event_espresso'), |
|
26 | - 'plural' => __('payment reminders', 'event_espresso') |
|
27 | - ); |
|
28 | - $this->_master_templates = array( |
|
29 | - 'email' => 'payment' |
|
30 | - ); |
|
31 | - |
|
32 | - parent::__construct(); |
|
33 | - } |
|
34 | - |
|
35 | - |
|
36 | - |
|
37 | - /** |
|
38 | - * _set_contexts |
|
39 | - * This sets up the contexts associated with the message_type |
|
40 | - * |
|
41 | - * @access protected |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - protected function _set_contexts() |
|
45 | - { |
|
46 | - $this->_context_label = array( |
|
47 | - 'label' => __('recipient', 'event_espresso'), |
|
48 | - 'plural' => __('recipients', 'event_espresso'), |
|
49 | - 'description' => __('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | - ); |
|
51 | - |
|
52 | - $this->_contexts = array( |
|
53 | - 'admin' => array( |
|
54 | - 'label' => __('Event Admin', 'event_espresso'), |
|
55 | - 'description' => __('This template is what event administrators will receive on a successful payment', 'event_espresso') |
|
56 | - ), |
|
57 | - 'primary_attendee' => array( |
|
58 | - 'label' => __('Primary Registrant', 'event_espresso'), |
|
59 | - 'description' => __('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso') |
|
60 | - ) |
|
61 | - ); |
|
62 | - } |
|
18 | + public function __construct() |
|
19 | + { |
|
20 | + |
|
21 | + // setup type details for reference |
|
22 | + $this->name = 'payment_reminder'; |
|
23 | + $this->description = __('This message type is used for all payment reminder messages. These are triggered when an offline gateway registration is completed or when manually triggered via event administrators via the transaction admin page(s).', 'event_espresso'); |
|
24 | + $this->label = array( |
|
25 | + 'singular' => __('payment reminder', 'event_espresso'), |
|
26 | + 'plural' => __('payment reminders', 'event_espresso') |
|
27 | + ); |
|
28 | + $this->_master_templates = array( |
|
29 | + 'email' => 'payment' |
|
30 | + ); |
|
31 | + |
|
32 | + parent::__construct(); |
|
33 | + } |
|
34 | + |
|
35 | + |
|
36 | + |
|
37 | + /** |
|
38 | + * _set_contexts |
|
39 | + * This sets up the contexts associated with the message_type |
|
40 | + * |
|
41 | + * @access protected |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + protected function _set_contexts() |
|
45 | + { |
|
46 | + $this->_context_label = array( |
|
47 | + 'label' => __('recipient', 'event_espresso'), |
|
48 | + 'plural' => __('recipients', 'event_espresso'), |
|
49 | + 'description' => __('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | + ); |
|
51 | + |
|
52 | + $this->_contexts = array( |
|
53 | + 'admin' => array( |
|
54 | + 'label' => __('Event Admin', 'event_espresso'), |
|
55 | + 'description' => __('This template is what event administrators will receive on a successful payment', 'event_espresso') |
|
56 | + ), |
|
57 | + 'primary_attendee' => array( |
|
58 | + 'label' => __('Primary Registrant', 'event_espresso'), |
|
59 | + 'description' => __('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso') |
|
60 | + ) |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | } |
@@ -15,37 +15,37 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - public function __construct($fields, $context) |
|
19 | - { |
|
20 | - $this->_m_name = 'email'; |
|
21 | - $this->_mt_name = 'payment_reminder'; |
|
22 | - |
|
23 | - parent::__construct($fields, $context); |
|
24 | - } |
|
25 | - |
|
26 | - /** |
|
27 | - * at this point no custom validation needed for this messenger/message_type combo. |
|
28 | - */ |
|
29 | - protected function _modify_validator() |
|
30 | - { |
|
31 | - $new_config = $this->_messenger->get_validator_config(); |
|
32 | - |
|
33 | - // modify just event_list |
|
34 | - $new_config['event_list'] = array( |
|
35 | - 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
36 | - ); |
|
37 | - $new_config['ticket_list'] = array( |
|
38 | - 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction') |
|
39 | - ); |
|
40 | - $new_config['content'] = array( |
|
41 | - 'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
42 | - ); |
|
43 | - $this->_messenger->set_validator_config($new_config); |
|
44 | - |
|
45 | - if ($this->_context != 'admin') { |
|
46 | - $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
47 | - } |
|
48 | - |
|
49 | - $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
|
50 | - } |
|
18 | + public function __construct($fields, $context) |
|
19 | + { |
|
20 | + $this->_m_name = 'email'; |
|
21 | + $this->_mt_name = 'payment_reminder'; |
|
22 | + |
|
23 | + parent::__construct($fields, $context); |
|
24 | + } |
|
25 | + |
|
26 | + /** |
|
27 | + * at this point no custom validation needed for this messenger/message_type combo. |
|
28 | + */ |
|
29 | + protected function _modify_validator() |
|
30 | + { |
|
31 | + $new_config = $this->_messenger->get_validator_config(); |
|
32 | + |
|
33 | + // modify just event_list |
|
34 | + $new_config['event_list'] = array( |
|
35 | + 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
36 | + ); |
|
37 | + $new_config['ticket_list'] = array( |
|
38 | + 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction') |
|
39 | + ); |
|
40 | + $new_config['content'] = array( |
|
41 | + 'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
42 | + ); |
|
43 | + $this->_messenger->set_validator_config($new_config); |
|
44 | + |
|
45 | + if ($this->_context != 'admin') { |
|
46 | + $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
47 | + } |
|
48 | + |
|
49 | + $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
|
50 | + } |
|
51 | 51 | } |
@@ -32,18 +32,18 @@ |
||
32 | 32 | |
33 | 33 | // modify just event_list |
34 | 34 | $new_config['event_list'] = array( |
35 | - 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
35 | + 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
36 | 36 | ); |
37 | 37 | $new_config['ticket_list'] = array( |
38 | 38 | 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction') |
39 | 39 | ); |
40 | 40 | $new_config['content'] = array( |
41 | - 'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
41 | + 'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
42 | 42 | ); |
43 | 43 | $this->_messenger->set_validator_config($new_config); |
44 | 44 | |
45 | 45 | if ($this->_context != 'admin') { |
46 | - $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
46 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -49,15 +49,15 @@ discard block |
||
49 | 49 | protected function _parser($shortcode) |
50 | 50 | { |
51 | 51 | |
52 | - if (! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) { |
|
52 | + if ( ! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) { |
|
53 | 53 | return ''; |
54 | 54 | } |
55 | 55 | |
56 | 56 | switch ($shortcode) { |
57 | 57 | case '[QUESTION]': |
58 | - $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ]) |
|
59 | - ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question(); |
|
60 | - if (! $question instanceof EE_Question) { |
|
58 | + $question = isset($this->_extra_data['data']->questions[$this->_data->ID()]) |
|
59 | + ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question(); |
|
60 | + if ( ! $question instanceof EE_Question) { |
|
61 | 61 | return ''; // get out because we can't figure out what the question is. |
62 | 62 | } |
63 | 63 | |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | |
67 | 67 | case '[ANSWER]': |
68 | 68 | // need to get the question to determine the type of question (some questions require translation of the answer). |
69 | - $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ]) |
|
70 | - ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question(); |
|
71 | - if (! $question instanceof EE_Question) { |
|
69 | + $question = isset($this->_extra_data['data']->questions[$this->_data->ID()]) |
|
70 | + ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question(); |
|
71 | + if ( ! $question instanceof EE_Question) { |
|
72 | 72 | return ''; // get out cause we can't figure out what the question type is! |
73 | 73 | } |
74 | 74 |
@@ -19,85 +19,85 @@ |
||
19 | 19 | { |
20 | 20 | |
21 | 21 | |
22 | - /** |
|
23 | - * _init_props |
|
24 | - * |
|
25 | - * @access protected |
|
26 | - * @return void |
|
27 | - */ |
|
28 | - protected function _init_props() |
|
29 | - { |
|
30 | - $this->label = esc_html__('Attendee Shortcodes', 'event_espresso'); |
|
31 | - $this->description = esc_html__('All shortcodes specific to attendee related data', 'event_espresso'); |
|
32 | - $this->_shortcodes = array( |
|
33 | - '[QUESTION]' => esc_html__('Will parse to a question.', 'event_espresso'), |
|
34 | - '[ANSWER]' => esc_html__('Will parse to the answer for a question', 'event_espresso'), |
|
35 | - ); |
|
36 | - } |
|
22 | + /** |
|
23 | + * _init_props |
|
24 | + * |
|
25 | + * @access protected |
|
26 | + * @return void |
|
27 | + */ |
|
28 | + protected function _init_props() |
|
29 | + { |
|
30 | + $this->label = esc_html__('Attendee Shortcodes', 'event_espresso'); |
|
31 | + $this->description = esc_html__('All shortcodes specific to attendee related data', 'event_espresso'); |
|
32 | + $this->_shortcodes = array( |
|
33 | + '[QUESTION]' => esc_html__('Will parse to a question.', 'event_espresso'), |
|
34 | + '[ANSWER]' => esc_html__('Will parse to the answer for a question', 'event_espresso'), |
|
35 | + ); |
|
36 | + } |
|
37 | 37 | |
38 | 38 | |
39 | - /** |
|
40 | - * This method will give parsing instructions for each shortcode defined in the _shortcodes array. Child methods |
|
41 | - * will have to take care of handling. |
|
42 | - * |
|
43 | - * @access protected |
|
44 | - * |
|
45 | - * @param string $shortcode the shortcode to be parsed. |
|
46 | - * |
|
47 | - * @return string parsed shortcode |
|
48 | - */ |
|
49 | - protected function _parser($shortcode) |
|
50 | - { |
|
39 | + /** |
|
40 | + * This method will give parsing instructions for each shortcode defined in the _shortcodes array. Child methods |
|
41 | + * will have to take care of handling. |
|
42 | + * |
|
43 | + * @access protected |
|
44 | + * |
|
45 | + * @param string $shortcode the shortcode to be parsed. |
|
46 | + * |
|
47 | + * @return string parsed shortcode |
|
48 | + */ |
|
49 | + protected function _parser($shortcode) |
|
50 | + { |
|
51 | 51 | |
52 | - if (! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) { |
|
53 | - return ''; |
|
54 | - } |
|
52 | + if (! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) { |
|
53 | + return ''; |
|
54 | + } |
|
55 | 55 | |
56 | - switch ($shortcode) { |
|
57 | - case '[QUESTION]': |
|
58 | - $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ]) |
|
59 | - ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question(); |
|
60 | - if (! $question instanceof EE_Question) { |
|
61 | - return ''; // get out because we can't figure out what the question is. |
|
62 | - } |
|
56 | + switch ($shortcode) { |
|
57 | + case '[QUESTION]': |
|
58 | + $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ]) |
|
59 | + ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question(); |
|
60 | + if (! $question instanceof EE_Question) { |
|
61 | + return ''; // get out because we can't figure out what the question is. |
|
62 | + } |
|
63 | 63 | |
64 | - return $question->get('QST_display_text'); |
|
65 | - break; |
|
64 | + return $question->get('QST_display_text'); |
|
65 | + break; |
|
66 | 66 | |
67 | - case '[ANSWER]': |
|
68 | - // need to get the question to determine the type of question (some questions require translation of the answer). |
|
69 | - $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ]) |
|
70 | - ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question(); |
|
71 | - if (! $question instanceof EE_Question) { |
|
72 | - return ''; // get out cause we can't figure out what the question type is! |
|
73 | - } |
|
67 | + case '[ANSWER]': |
|
68 | + // need to get the question to determine the type of question (some questions require translation of the answer). |
|
69 | + $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ]) |
|
70 | + ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question(); |
|
71 | + if (! $question instanceof EE_Question) { |
|
72 | + return ''; // get out cause we can't figure out what the question type is! |
|
73 | + } |
|
74 | 74 | |
75 | - // what we show for the answer depends on the question type! |
|
76 | - switch ($question->get('QST_type')) { |
|
77 | - case 'STATE': |
|
78 | - $state = EEM_State::instance()->get_one_by_ID($this->_data->get('ANS_value')); |
|
79 | - $answer = $state instanceof EE_State ? $state->name() : ''; |
|
80 | - break; |
|
75 | + // what we show for the answer depends on the question type! |
|
76 | + switch ($question->get('QST_type')) { |
|
77 | + case 'STATE': |
|
78 | + $state = EEM_State::instance()->get_one_by_ID($this->_data->get('ANS_value')); |
|
79 | + $answer = $state instanceof EE_State ? $state->name() : ''; |
|
80 | + break; |
|
81 | 81 | |
82 | - case 'COUNTRY': |
|
83 | - $country = EEM_Country::instance()->get_one_by_ID($this->_data->get('ANS_value')); |
|
84 | - $answer = $country instanceof EE_Country ? $country->name() : ''; |
|
85 | - break; |
|
82 | + case 'COUNTRY': |
|
83 | + $country = EEM_Country::instance()->get_one_by_ID($this->_data->get('ANS_value')); |
|
84 | + $answer = $country instanceof EE_Country ? $country->name() : ''; |
|
85 | + break; |
|
86 | 86 | |
87 | - default: |
|
88 | - $answer = $this->_data->get_pretty('ANS_value', 'no_wpautop'); |
|
89 | - break; |
|
90 | - } |
|
87 | + default: |
|
88 | + $answer = $this->_data->get_pretty('ANS_value', 'no_wpautop'); |
|
89 | + break; |
|
90 | + } |
|
91 | 91 | |
92 | - return apply_filters( |
|
93 | - 'FHEE__EE_Question_Shortcodes___parser__answer', |
|
94 | - $answer, |
|
95 | - $question, |
|
96 | - $this->_data |
|
97 | - ); |
|
98 | - break; |
|
99 | - } |
|
92 | + return apply_filters( |
|
93 | + 'FHEE__EE_Question_Shortcodes___parser__answer', |
|
94 | + $answer, |
|
95 | + $question, |
|
96 | + $this->_data |
|
97 | + ); |
|
98 | + break; |
|
99 | + } |
|
100 | 100 | |
101 | - return ''; |
|
102 | - } |
|
101 | + return ''; |
|
102 | + } |
|
103 | 103 | } |
@@ -14,93 +14,93 @@ |
||
14 | 14 | class EE_Newsletter_Shortcodes extends EE_Shortcodes |
15 | 15 | { |
16 | 16 | |
17 | - protected function _init_props() |
|
18 | - { |
|
19 | - $this->label = __("Batch Messages Shortcodes", 'event_espresso'); |
|
20 | - $this->description = __('All shortcodes used for the batch message type', 'event_espresso'); |
|
21 | - $this->_shortcodes = array( |
|
22 | - '[NEWSLETTER_CONTENT]' => __( |
|
23 | - 'This will parse to whatever is found in the related [newsletter_content] field. Note that when triggering a batch message, whatever is added for the custom message will be inserted where this shortcode is placed.', |
|
24 | - 'event_espresso' |
|
25 | - ), |
|
26 | - ); |
|
27 | - } |
|
17 | + protected function _init_props() |
|
18 | + { |
|
19 | + $this->label = __("Batch Messages Shortcodes", 'event_espresso'); |
|
20 | + $this->description = __('All shortcodes used for the batch message type', 'event_espresso'); |
|
21 | + $this->_shortcodes = array( |
|
22 | + '[NEWSLETTER_CONTENT]' => __( |
|
23 | + 'This will parse to whatever is found in the related [newsletter_content] field. Note that when triggering a batch message, whatever is added for the custom message will be inserted where this shortcode is placed.', |
|
24 | + 'event_espresso' |
|
25 | + ), |
|
26 | + ); |
|
27 | + } |
|
28 | 28 | |
29 | 29 | |
30 | - protected function _parser($shortcode) |
|
31 | - { |
|
32 | - if ($shortcode == '[NEWSLETTER_CONTENT]') { |
|
33 | - $this->_validate_list_requirements(); |
|
34 | - $valid_shortcodes = array('recipient_details', 'organization'); |
|
35 | - $template = $this->_data['template']['newsletter_content']; |
|
36 | - $data = $this->_data; |
|
37 | - return $this->_shortcode_helper->parse_message_template( |
|
38 | - $template, |
|
39 | - $data['data'], |
|
40 | - $valid_shortcodes, |
|
41 | - $this->_message_type, |
|
42 | - $this->_messenger, |
|
43 | - $this->_message |
|
44 | - ); |
|
45 | - } |
|
46 | - } |
|
30 | + protected function _parser($shortcode) |
|
31 | + { |
|
32 | + if ($shortcode == '[NEWSLETTER_CONTENT]') { |
|
33 | + $this->_validate_list_requirements(); |
|
34 | + $valid_shortcodes = array('recipient_details', 'organization'); |
|
35 | + $template = $this->_data['template']['newsletter_content']; |
|
36 | + $data = $this->_data; |
|
37 | + return $this->_shortcode_helper->parse_message_template( |
|
38 | + $template, |
|
39 | + $data['data'], |
|
40 | + $valid_shortcodes, |
|
41 | + $this->_message_type, |
|
42 | + $this->_messenger, |
|
43 | + $this->_message |
|
44 | + ); |
|
45 | + } |
|
46 | + } |
|
47 | 47 | |
48 | 48 | |
49 | - /** |
|
50 | - * Callback set in args for EE_Register_Messages_Shortcode_Library::register for 'msgr_validator_callback'. |
|
51 | - * |
|
52 | - * EE_Register_Messages_Shortcode_Library::register registers this callback with the |
|
53 | - * 'FHEE__EE_messenger__get_validator_config' filter. |
|
54 | - * |
|
55 | - * @since 4.3.0 |
|
56 | - * @param array $validator_config current validator configuration array |
|
57 | - * @param EE_messenger $messenger |
|
58 | - * @return array new validator config. |
|
59 | - */ |
|
60 | - public static function messenger_validator_config($validator_config, EE_messenger $messenger) |
|
61 | - { |
|
62 | - if ($messenger->name !== 'email') { |
|
63 | - return $validator_config; |
|
64 | - } |
|
49 | + /** |
|
50 | + * Callback set in args for EE_Register_Messages_Shortcode_Library::register for 'msgr_validator_callback'. |
|
51 | + * |
|
52 | + * EE_Register_Messages_Shortcode_Library::register registers this callback with the |
|
53 | + * 'FHEE__EE_messenger__get_validator_config' filter. |
|
54 | + * |
|
55 | + * @since 4.3.0 |
|
56 | + * @param array $validator_config current validator configuration array |
|
57 | + * @param EE_messenger $messenger |
|
58 | + * @return array new validator config. |
|
59 | + */ |
|
60 | + public static function messenger_validator_config($validator_config, EE_messenger $messenger) |
|
61 | + { |
|
62 | + if ($messenger->name !== 'email') { |
|
63 | + return $validator_config; |
|
64 | + } |
|
65 | 65 | |
66 | - $validator_config['content']['shortcodes'][] = 'newsletter'; |
|
67 | - $validator_config['newsletter_content'] = array( |
|
68 | - 'shortcodes' => array('recipient_details', 'organization'), |
|
69 | - 'required' => array('[NEWSLETTER_CONTENT]'), |
|
70 | - ); |
|
71 | - return $validator_config; |
|
72 | - } |
|
66 | + $validator_config['content']['shortcodes'][] = 'newsletter'; |
|
67 | + $validator_config['newsletter_content'] = array( |
|
68 | + 'shortcodes' => array('recipient_details', 'organization'), |
|
69 | + 'required' => array('[NEWSLETTER_CONTENT]'), |
|
70 | + ); |
|
71 | + return $validator_config; |
|
72 | + } |
|
73 | 73 | |
74 | 74 | |
75 | - /** |
|
76 | - * Callback set in args for EE_Register_Messages_Shortcode_Library::register for |
|
77 | - * 'msgr_template_fields_callback'. |
|
78 | - * |
|
79 | - * EE_Register_Messages_Shortcode_Library::register registers this callback with the |
|
80 | - * FHEE__EE_messenger__get_template_fields filter. |
|
81 | - * |
|
82 | - * @since 4.3.0 |
|
83 | - * |
|
84 | - * @param array $template_fields current template fields setup array. |
|
85 | - * @param EE_messenger $messenger |
|
86 | - * @return array new/modified template fields array. |
|
87 | - */ |
|
88 | - public static function messenger_template_fields($template_fields, EE_messenger $messenger) |
|
89 | - { |
|
90 | - if ($messenger->name !== 'email') { |
|
91 | - return $template_fields; |
|
92 | - } |
|
75 | + /** |
|
76 | + * Callback set in args for EE_Register_Messages_Shortcode_Library::register for |
|
77 | + * 'msgr_template_fields_callback'. |
|
78 | + * |
|
79 | + * EE_Register_Messages_Shortcode_Library::register registers this callback with the |
|
80 | + * FHEE__EE_messenger__get_template_fields filter. |
|
81 | + * |
|
82 | + * @since 4.3.0 |
|
83 | + * |
|
84 | + * @param array $template_fields current template fields setup array. |
|
85 | + * @param EE_messenger $messenger |
|
86 | + * @return array new/modified template fields array. |
|
87 | + */ |
|
88 | + public static function messenger_template_fields($template_fields, EE_messenger $messenger) |
|
89 | + { |
|
90 | + if ($messenger->name !== 'email') { |
|
91 | + return $template_fields; |
|
92 | + } |
|
93 | 93 | |
94 | - $template_fields['extra']['content']['newsletter_content'] = array( |
|
95 | - 'input' => 'wp_editor', |
|
96 | - 'label' => '[NEWSLETTER_CONTENT]', |
|
97 | - 'type' => 'string', |
|
98 | - 'required' => true, |
|
99 | - 'validation' => true, |
|
100 | - 'format' => '%s', |
|
101 | - 'rows' => '15', |
|
102 | - 'shortcodes_required' => array('[NEWSLETTER_CONTENT]'), |
|
103 | - ); |
|
104 | - return $template_fields; |
|
105 | - } |
|
94 | + $template_fields['extra']['content']['newsletter_content'] = array( |
|
95 | + 'input' => 'wp_editor', |
|
96 | + 'label' => '[NEWSLETTER_CONTENT]', |
|
97 | + 'type' => 'string', |
|
98 | + 'required' => true, |
|
99 | + 'validation' => true, |
|
100 | + 'format' => '%s', |
|
101 | + 'rows' => '15', |
|
102 | + 'shortcodes_required' => array('[NEWSLETTER_CONTENT]'), |
|
103 | + ); |
|
104 | + return $template_fields; |
|
105 | + } |
|
106 | 106 | } |
@@ -83,12 +83,12 @@ |
||
83 | 83 | $template = empty($template) && isset($this->_extra_data['template']['question_list']) |
84 | 84 | ? $this->_extra_data['template']['question_list'] : $template; |
85 | 85 | $ans_result = ''; |
86 | - $answers = ! empty($this->_extra_data['data']->registrations[ $reg_obj->ID() ]['ans_objs']) |
|
87 | - ? $this->_extra_data['data']->registrations[ $reg_obj->ID() ]['ans_objs'] : array(); |
|
86 | + $answers = ! empty($this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs']) |
|
87 | + ? $this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs'] : array(); |
|
88 | 88 | $questions = ! empty($this->_extra_data['data']->questions) ? $this->_extra_data['data']->questions : array(); |
89 | 89 | foreach ($answers as $answer) { |
90 | 90 | // first see if the question is in our $questions array. If not then try to get from answer object |
91 | - $question = isset($questions[ $answer->ID() ]) ? $questions[ $answer->ID() ] : null; |
|
91 | + $question = isset($questions[$answer->ID()]) ? $questions[$answer->ID()] : null; |
|
92 | 92 | $question = ! $question instanceof EE_Question ? $answer->question() : $question; |
93 | 93 | if ($question instanceof EE_Question and $question->admin_only()) { |
94 | 94 | continue; |
@@ -16,96 +16,96 @@ |
||
16 | 16 | class EE_Question_List_Shortcodes extends EE_Shortcodes |
17 | 17 | { |
18 | 18 | |
19 | - protected function _init_props() |
|
20 | - { |
|
21 | - $this->label = __('Questions and Answers Shortcodes', 'event_espresso'); |
|
22 | - $this->description = __('All shortcodes related to custom questions and answers', 'event_espresso'); |
|
23 | - $this->_shortcodes = array( |
|
24 | - '[QUESTION_LIST]' => __( |
|
25 | - 'This is used to indicate where you want the list of questions and answers to show for the registrant. You place this within the "[attendee_list]" field.', |
|
26 | - 'event_espresso' |
|
27 | - ), |
|
28 | - ); |
|
29 | - } |
|
19 | + protected function _init_props() |
|
20 | + { |
|
21 | + $this->label = __('Questions and Answers Shortcodes', 'event_espresso'); |
|
22 | + $this->description = __('All shortcodes related to custom questions and answers', 'event_espresso'); |
|
23 | + $this->_shortcodes = array( |
|
24 | + '[QUESTION_LIST]' => __( |
|
25 | + 'This is used to indicate where you want the list of questions and answers to show for the registrant. You place this within the "[attendee_list]" field.', |
|
26 | + 'event_espresso' |
|
27 | + ), |
|
28 | + ); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @param string $shortcode |
|
34 | - * @return string |
|
35 | - * @throws EE_Error |
|
36 | - * @throws ReflectionException |
|
37 | - */ |
|
38 | - protected function _parser($shortcode) |
|
39 | - { |
|
40 | - switch ($shortcode) { |
|
41 | - case '[QUESTION_LIST]': |
|
42 | - return $this->_get_question_list(); |
|
43 | - break; |
|
44 | - } |
|
32 | + /** |
|
33 | + * @param string $shortcode |
|
34 | + * @return string |
|
35 | + * @throws EE_Error |
|
36 | + * @throws ReflectionException |
|
37 | + */ |
|
38 | + protected function _parser($shortcode) |
|
39 | + { |
|
40 | + switch ($shortcode) { |
|
41 | + case '[QUESTION_LIST]': |
|
42 | + return $this->_get_question_list(); |
|
43 | + break; |
|
44 | + } |
|
45 | 45 | |
46 | - return ''; |
|
47 | - } |
|
46 | + return ''; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * @return string |
|
52 | - * @throws EE_Error |
|
53 | - * @throws ReflectionException |
|
54 | - */ |
|
55 | - protected function _get_question_list() |
|
56 | - { |
|
57 | - $this->_validate_list_requirements(); |
|
50 | + /** |
|
51 | + * @return string |
|
52 | + * @throws EE_Error |
|
53 | + * @throws ReflectionException |
|
54 | + */ |
|
55 | + protected function _get_question_list() |
|
56 | + { |
|
57 | + $this->_validate_list_requirements(); |
|
58 | 58 | |
59 | - if ($this->_data['data'] instanceof EE_Registration) { |
|
60 | - // for when [QUESTION_LIST] is used in the [attendee_list] field. |
|
61 | - return $this->_get_question_answer_list_for_attendee(); |
|
62 | - } elseif ( |
|
63 | - $this->_data['data'] instanceof EE_Messages_Addressee |
|
64 | - && $this->_data['data']->reg_obj instanceof EE_Registration |
|
65 | - ) { |
|
66 | - // for when [QUESTION_LIST] is used in the main content field. |
|
67 | - return $this->_get_question_answer_list_for_attendee($this->_data['data']->reg_obj); |
|
68 | - } |
|
69 | - return ''; |
|
70 | - } |
|
59 | + if ($this->_data['data'] instanceof EE_Registration) { |
|
60 | + // for when [QUESTION_LIST] is used in the [attendee_list] field. |
|
61 | + return $this->_get_question_answer_list_for_attendee(); |
|
62 | + } elseif ( |
|
63 | + $this->_data['data'] instanceof EE_Messages_Addressee |
|
64 | + && $this->_data['data']->reg_obj instanceof EE_Registration |
|
65 | + ) { |
|
66 | + // for when [QUESTION_LIST] is used in the main content field. |
|
67 | + return $this->_get_question_answer_list_for_attendee($this->_data['data']->reg_obj); |
|
68 | + } |
|
69 | + return ''; |
|
70 | + } |
|
71 | 71 | |
72 | 72 | |
73 | - /** |
|
74 | - * Note when we parse the "[question_list]" shortcode for attendees we're actually going to retrieve the list of |
|
75 | - * answers for that attendee since that is what we really need (we can derive the questions from the answers); |
|
76 | - * |
|
77 | - * @param null $reg_obj |
|
78 | - * @return string parsed template. |
|
79 | - * @throws EE_Error |
|
80 | - * @throws ReflectionException |
|
81 | - */ |
|
82 | - private function _get_question_answer_list_for_attendee($reg_obj = null) |
|
83 | - { |
|
84 | - $valid_shortcodes = array('question'); |
|
85 | - $reg_obj = $reg_obj instanceof EE_Registration ? $reg_obj : $this->_data['data']; |
|
86 | - $template = is_array($this->_data['template']) && isset($this->_data['template']['question_list']) |
|
87 | - ? $this->_data['template']['question_list'] : ''; |
|
88 | - $template = empty($template) && isset($this->_extra_data['template']['question_list']) |
|
89 | - ? $this->_extra_data['template']['question_list'] : $template; |
|
90 | - $ans_result = ''; |
|
91 | - $answers = ! empty($this->_extra_data['data']->registrations[ $reg_obj->ID() ]['ans_objs']) |
|
92 | - ? $this->_extra_data['data']->registrations[ $reg_obj->ID() ]['ans_objs'] : array(); |
|
93 | - $questions = ! empty($this->_extra_data['data']->questions) ? $this->_extra_data['data']->questions : array(); |
|
94 | - foreach ($answers as $answer) { |
|
95 | - // first see if the question is in our $questions array. If not then try to get from answer object |
|
96 | - $question = isset($questions[ $answer->ID() ]) ? $questions[ $answer->ID() ] : null; |
|
97 | - $question = ! $question instanceof EE_Question ? $answer->question() : $question; |
|
98 | - if ($question instanceof EE_Question and $question->admin_only()) { |
|
99 | - continue; |
|
100 | - } |
|
101 | - $ans_result .= $this->_shortcode_helper->parse_question_list_template( |
|
102 | - $template, |
|
103 | - $answer, |
|
104 | - $valid_shortcodes, |
|
105 | - $this->_extra_data |
|
106 | - ); |
|
107 | - } |
|
73 | + /** |
|
74 | + * Note when we parse the "[question_list]" shortcode for attendees we're actually going to retrieve the list of |
|
75 | + * answers for that attendee since that is what we really need (we can derive the questions from the answers); |
|
76 | + * |
|
77 | + * @param null $reg_obj |
|
78 | + * @return string parsed template. |
|
79 | + * @throws EE_Error |
|
80 | + * @throws ReflectionException |
|
81 | + */ |
|
82 | + private function _get_question_answer_list_for_attendee($reg_obj = null) |
|
83 | + { |
|
84 | + $valid_shortcodes = array('question'); |
|
85 | + $reg_obj = $reg_obj instanceof EE_Registration ? $reg_obj : $this->_data['data']; |
|
86 | + $template = is_array($this->_data['template']) && isset($this->_data['template']['question_list']) |
|
87 | + ? $this->_data['template']['question_list'] : ''; |
|
88 | + $template = empty($template) && isset($this->_extra_data['template']['question_list']) |
|
89 | + ? $this->_extra_data['template']['question_list'] : $template; |
|
90 | + $ans_result = ''; |
|
91 | + $answers = ! empty($this->_extra_data['data']->registrations[ $reg_obj->ID() ]['ans_objs']) |
|
92 | + ? $this->_extra_data['data']->registrations[ $reg_obj->ID() ]['ans_objs'] : array(); |
|
93 | + $questions = ! empty($this->_extra_data['data']->questions) ? $this->_extra_data['data']->questions : array(); |
|
94 | + foreach ($answers as $answer) { |
|
95 | + // first see if the question is in our $questions array. If not then try to get from answer object |
|
96 | + $question = isset($questions[ $answer->ID() ]) ? $questions[ $answer->ID() ] : null; |
|
97 | + $question = ! $question instanceof EE_Question ? $answer->question() : $question; |
|
98 | + if ($question instanceof EE_Question and $question->admin_only()) { |
|
99 | + continue; |
|
100 | + } |
|
101 | + $ans_result .= $this->_shortcode_helper->parse_question_list_template( |
|
102 | + $template, |
|
103 | + $answer, |
|
104 | + $valid_shortcodes, |
|
105 | + $this->_extra_data |
|
106 | + ); |
|
107 | + } |
|
108 | 108 | |
109 | - return $ans_result; |
|
110 | - } |
|
109 | + return $ans_result; |
|
110 | + } |
|
111 | 111 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | </label> |
51 | 51 | </th> |
52 | 52 | <td> |
53 | - <p><?php echo site_url() . '/ ' |
|
53 | + <p><?php echo site_url().'/ ' |
|
54 | 54 | . EEH_Form_Fields::text( |
55 | 55 | 'not_used', |
56 | 56 | EE_Registry::instance()->CFG->core->event_cpt_slug, |
@@ -2,18 +2,18 @@ discard block |
||
2 | 2 | add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); |
3 | 3 | |
4 | 4 | $values = EEH_Form_Fields::prep_answer_options( |
5 | - array( |
|
6 | - array('id' => 1, 'text' => __('Yes', 'event_espresso')), |
|
7 | - array('id' => 0, 'text' => __('No', 'event_espresso')), |
|
8 | - ) |
|
5 | + array( |
|
6 | + array('id' => 1, 'text' => __('Yes', 'event_espresso')), |
|
7 | + array('id' => 0, 'text' => __('No', 'event_espresso')), |
|
8 | + ) |
|
9 | 9 | ); |
10 | 10 | |
11 | 11 | $description = EEH_Form_Fields::prep_answer_options( |
12 | - array( |
|
13 | - array('id' => 0, 'text' => __('none', 'event_espresso')), |
|
14 | - array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')), |
|
15 | - array('id' => 2, 'text' => __('full description', 'event_espresso')), |
|
16 | - ) |
|
12 | + array( |
|
13 | + array('id' => 0, 'text' => __('none', 'event_espresso')), |
|
14 | + array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')), |
|
15 | + array('id' => 2, 'text' => __('full description', 'event_espresso')), |
|
16 | + ) |
|
17 | 17 | ); |
18 | 18 | |
19 | 19 | ?> |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | <th> |
33 | 33 | <label for="event_listings_url"> |
34 | 34 | <?php _e('Event Listings URL', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link( |
35 | - 'event_listings_url_info' |
|
36 | - ); ?> |
|
35 | + 'event_listings_url_info' |
|
36 | + ); ?> |
|
37 | 37 | </label> |
38 | 38 | </th> |
39 | 39 | <td> |
40 | 40 | <a id="event_listings_url" class="ee-admin-settings-hdr-lnk small-text" |
41 | 41 | href="<?php echo EEH_Event_View::event_archive_url(); ?>"><?php |
42 | - echo EEH_Event_View::event_archive_url(); ?></a> |
|
42 | + echo EEH_Event_View::event_archive_url(); ?></a> |
|
43 | 43 | </td> |
44 | 44 | </tr> |
45 | 45 | |
@@ -51,30 +51,30 @@ discard block |
||
51 | 51 | </th> |
52 | 52 | <td> |
53 | 53 | <p><?php echo site_url() . '/ ' |
54 | - . EEH_Form_Fields::text( |
|
55 | - 'not_used', |
|
56 | - EE_Registry::instance()->CFG->core->event_cpt_slug, |
|
57 | - 'event_cpt_slug', |
|
58 | - 'event_cpt_slug', |
|
59 | - 'regular' |
|
60 | - ); ?></p> |
|
54 | + . EEH_Form_Fields::text( |
|
55 | + 'not_used', |
|
56 | + EE_Registry::instance()->CFG->core->event_cpt_slug, |
|
57 | + 'event_cpt_slug', |
|
58 | + 'event_cpt_slug', |
|
59 | + 'regular' |
|
60 | + ); ?></p> |
|
61 | 61 | <p class="description"><?php |
62 | - _e( |
|
63 | - 'This allows you to configure what slug is used for the url of all event pages.', |
|
64 | - 'event_espresso' |
|
65 | - ); ?></p> |
|
62 | + _e( |
|
63 | + 'This allows you to configure what slug is used for the url of all event pages.', |
|
64 | + 'event_espresso' |
|
65 | + ); ?></p> |
|
66 | 66 | <?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?> |
67 | 67 | <p class="important-notice"> |
68 | 68 | <?php |
69 | - sprintf( |
|
70 | - __( |
|
71 | - 'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected. Please be aware that while this filter is being used, this setting has no affect.', |
|
72 | - 'event_espresso' |
|
73 | - ), |
|
74 | - '<code>', |
|
75 | - '</code>' |
|
76 | - ); |
|
77 | - ?> |
|
69 | + sprintf( |
|
70 | + __( |
|
71 | + 'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected. Please be aware that while this filter is being used, this setting has no affect.', |
|
72 | + 'event_espresso' |
|
73 | + ), |
|
74 | + '<code>', |
|
75 | + '</code>' |
|
76 | + ); |
|
77 | + ?> |
|
78 | 78 | </p> |
79 | 79 | <?php endif; ?> |
80 | 80 | </td> |
@@ -88,17 +88,17 @@ discard block |
||
88 | 88 | </th> |
89 | 89 | <td> |
90 | 90 | <?php echo EEH_Form_Fields::select( |
91 | - 'display_status_banner', |
|
92 | - $display_status_banner, |
|
93 | - $values, |
|
94 | - 'EED_Events_Archive_display_status_banner', |
|
95 | - 'EED_Events_Archive_display_status_banner' |
|
96 | - ); ?> |
|
91 | + 'display_status_banner', |
|
92 | + $display_status_banner, |
|
93 | + $values, |
|
94 | + 'EED_Events_Archive_display_status_banner', |
|
95 | + 'EED_Events_Archive_display_status_banner' |
|
96 | + ); ?> |
|
97 | 97 | <p class="description"><?php |
98 | - _e( |
|
99 | - 'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.', |
|
100 | - 'event_espresso' |
|
101 | - ); ?></p> |
|
98 | + _e( |
|
99 | + 'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.', |
|
100 | + 'event_espresso' |
|
101 | + ); ?></p> |
|
102 | 102 | </td> |
103 | 103 | </tr> |
104 | 104 | |
@@ -106,18 +106,18 @@ discard block |
||
106 | 106 | <th> |
107 | 107 | <label for="EED_Events_Archive_display_description"> |
108 | 108 | <?php _e('Display Description', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link( |
109 | - 'display_description_info' |
|
110 | - ); ?> |
|
109 | + 'display_description_info' |
|
110 | + ); ?> |
|
111 | 111 | </label> |
112 | 112 | </th> |
113 | 113 | <td> |
114 | 114 | <?php echo EEH_Form_Fields::select( |
115 | - 'description', |
|
116 | - $display_description, |
|
117 | - $description, |
|
118 | - 'EED_Events_Archive_display_description', |
|
119 | - 'EED_Events_Archive_display_description' |
|
120 | - ); ?> |
|
115 | + 'description', |
|
116 | + $display_description, |
|
117 | + $description, |
|
118 | + 'EED_Events_Archive_display_description', |
|
119 | + 'EED_Events_Archive_display_description' |
|
120 | + ); ?> |
|
121 | 121 | </td> |
122 | 122 | </tr> |
123 | 123 | |
@@ -125,18 +125,18 @@ discard block |
||
125 | 125 | <th> |
126 | 126 | <label for="EED_Events_Archive_display_ticket_selector"> |
127 | 127 | <?php _e('Display Ticket Selector', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link( |
128 | - 'display_ticket_selector_info' |
|
129 | - ); ?> |
|
128 | + 'display_ticket_selector_info' |
|
129 | + ); ?> |
|
130 | 130 | </label> |
131 | 131 | </th> |
132 | 132 | <td> |
133 | 133 | <?php echo EEH_Form_Fields::select( |
134 | - 'ticket_selector', |
|
135 | - $display_ticket_selector, |
|
136 | - $values, |
|
137 | - 'EED_Events_Archive_display_ticket_selector', |
|
138 | - 'EED_Events_Archive_display_ticket_selector' |
|
139 | - ); ?> |
|
134 | + 'ticket_selector', |
|
135 | + $display_ticket_selector, |
|
136 | + $values, |
|
137 | + 'EED_Events_Archive_display_ticket_selector', |
|
138 | + 'EED_Events_Archive_display_ticket_selector' |
|
139 | + ); ?> |
|
140 | 140 | </td> |
141 | 141 | </tr> |
142 | 142 | |
@@ -144,18 +144,18 @@ discard block |
||
144 | 144 | <th> |
145 | 145 | <label for="EED_Events_Archive_display_datetimes"> |
146 | 146 | <?php _e('Display Datetimes', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link( |
147 | - 'display_datetimes_info' |
|
148 | - ); ?> |
|
147 | + 'display_datetimes_info' |
|
148 | + ); ?> |
|
149 | 149 | </label> |
150 | 150 | </th> |
151 | 151 | <td> |
152 | 152 | <?php echo EEH_Form_Fields::select( |
153 | - 'venue_details', |
|
154 | - $display_datetimes, |
|
155 | - $values, |
|
156 | - 'EED_Events_Archive_display_datetimes', |
|
157 | - 'EED_Events_Archive_display_datetimes' |
|
158 | - ); ?> |
|
153 | + 'venue_details', |
|
154 | + $display_datetimes, |
|
155 | + $values, |
|
156 | + 'EED_Events_Archive_display_datetimes', |
|
157 | + 'EED_Events_Archive_display_datetimes' |
|
158 | + ); ?> |
|
159 | 159 | </td> |
160 | 160 | </tr> |
161 | 161 | |
@@ -163,18 +163,18 @@ discard block |
||
163 | 163 | <th> |
164 | 164 | <label for="EED_Events_Archive_display_venue"> |
165 | 165 | <?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link( |
166 | - 'display_venue_details_info' |
|
167 | - ); ?> |
|
166 | + 'display_venue_details_info' |
|
167 | + ); ?> |
|
168 | 168 | </label> |
169 | 169 | </th> |
170 | 170 | <td> |
171 | 171 | <?php echo EEH_Form_Fields::select( |
172 | - 'display_venue', |
|
173 | - $display_venue, |
|
174 | - $values, |
|
175 | - 'EED_Events_Archive_display_venue', |
|
176 | - 'EED_Events_Archive_display_venue' |
|
177 | - ); ?> |
|
172 | + 'display_venue', |
|
173 | + $display_venue, |
|
174 | + $values, |
|
175 | + 'EED_Events_Archive_display_venue', |
|
176 | + 'EED_Events_Archive_display_venue' |
|
177 | + ); ?> |
|
178 | 178 | </td> |
179 | 179 | </tr> |
180 | 180 | |
@@ -182,18 +182,18 @@ discard block |
||
182 | 182 | <th> |
183 | 183 | <label for="EED_Events_Archive_display_expired_events"> |
184 | 184 | <?php _e('Display Expired Events', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link( |
185 | - 'display_expired_events_info' |
|
186 | - ); ?> |
|
185 | + 'display_expired_events_info' |
|
186 | + ); ?> |
|
187 | 187 | </label> |
188 | 188 | </th> |
189 | 189 | <td> |
190 | 190 | <?php echo EEH_Form_Fields::select( |
191 | - 'expired_events', |
|
192 | - $display_expired_events, |
|
193 | - $values, |
|
194 | - 'EED_Events_Archive_display_expired_events', |
|
195 | - 'EED_Events_Archive_display_expired_events' |
|
196 | - ); ?> |
|
191 | + 'expired_events', |
|
192 | + $display_expired_events, |
|
193 | + $values, |
|
194 | + 'EED_Events_Archive_display_expired_events', |
|
195 | + 'EED_Events_Archive_display_expired_events' |
|
196 | + ); ?> |
|
197 | 197 | </td> |
198 | 198 | </tr> |
199 | 199 | |
@@ -201,43 +201,43 @@ discard block |
||
201 | 201 | <th> |
202 | 202 | <label for="EED_Events_Archive_use_sortable_display_order"> |
203 | 203 | <?php _e( |
204 | - 'Use Custom Display Order?', |
|
205 | - 'event_espresso' |
|
206 | - ); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?> |
|
204 | + 'Use Custom Display Order?', |
|
205 | + 'event_espresso' |
|
206 | + ); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?> |
|
207 | 207 | </label> |
208 | 208 | </th> |
209 | 209 | <td> |
210 | 210 | <?php echo EEH_Form_Fields::select( |
211 | - 'use_sortable_display_order', |
|
212 | - $use_sortable_display_order, |
|
213 | - $values, |
|
214 | - 'EED_Events_Archive_use_sortable_display_order', |
|
215 | - 'EED_Events_Archive_use_sortable_display_order' |
|
216 | - ); ?> |
|
211 | + 'use_sortable_display_order', |
|
212 | + $use_sortable_display_order, |
|
213 | + $values, |
|
214 | + 'EED_Events_Archive_use_sortable_display_order', |
|
215 | + 'EED_Events_Archive_use_sortable_display_order' |
|
216 | + ); ?> |
|
217 | 217 | </td> |
218 | 218 | </tr> |
219 | 219 | |
220 | 220 | <tr> |
221 | 221 | <th> |
222 | 222 | <?php _e( |
223 | - 'Display Order', |
|
224 | - 'event_espresso' |
|
225 | - ); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?> |
|
223 | + 'Display Order', |
|
224 | + 'event_espresso' |
|
225 | + ); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?> |
|
226 | 226 | </th> |
227 | 227 | <td> |
228 | 228 | |
229 | 229 | <?php wp_nonce_field( |
230 | - 'espresso_update_event_archive_order', |
|
231 | - 'espresso_update_event_archive_order_nonce', |
|
232 | - false |
|
233 | - ); ?> |
|
230 | + 'espresso_update_event_archive_order', |
|
231 | + 'espresso_update_event_archive_order_nonce', |
|
232 | + false |
|
233 | + ); ?> |
|
234 | 234 | <?php echo $event_archive_display_order; ?> |
235 | 235 | |
236 | 236 | <p class="description"><?php |
237 | - _e( |
|
238 | - 'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', |
|
239 | - 'event_espresso' |
|
240 | - ); ?></p> |
|
237 | + _e( |
|
238 | + 'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', |
|
239 | + 'event_espresso' |
|
240 | + ); ?></p> |
|
241 | 241 | |
242 | 242 | </td> |
243 | 243 | </tr> |
@@ -250,12 +250,12 @@ discard block |
||
250 | 250 | </th> |
251 | 251 | <td> |
252 | 252 | <?php echo EEH_Form_Fields::select( |
253 | - 'reset_event_list_settings', |
|
254 | - 0, |
|
255 | - $values, |
|
256 | - 'EED_Events_Archive_reset_event_list_settings', |
|
257 | - 'EED_Events_Archive_reset_event_list_settings' |
|
258 | - ); ?> |
|
253 | + 'reset_event_list_settings', |
|
254 | + 0, |
|
255 | + $values, |
|
256 | + 'EED_Events_Archive_reset_event_list_settings', |
|
257 | + 'EED_Events_Archive_reset_event_list_settings' |
|
258 | + ); ?> |
|
259 | 259 | </td> |
260 | 260 | </tr> |
261 | 261 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | if (! defined('EVENT_ESPRESSO_VERSION')) { |
3 | - exit('No direct script access allowed'); |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** @type string $recaptcha_language */ |
6 | 6 | /** @type string $recaptcha_publickey */ |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if (! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | 3 | exit('No direct script access allowed'); |
4 | 4 | } |
5 | 5 | /** @type string $recaptcha_language */ |