@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | <div id="espresso-event-details-dv" class="" > |
20 | 20 | <?php |
21 | 21 | // Start the Loop. |
22 | - while ( have_posts() ) : the_post(); |
|
22 | + while (have_posts()) : the_post(); |
|
23 | 23 | // Include the post TYPE-specific template for the content. |
24 | - espresso_get_template_part( 'content', 'espresso_events' ); |
|
24 | + espresso_get_template_part('content', 'espresso_events'); |
|
25 | 25 | // If comments are open or we have at least one comment, load up the comment template. |
26 | - if ( comments_open() || get_comments_number() ) { |
|
26 | + if (comments_open() || get_comments_number()) { |
|
27 | 27 | comments_template(); |
28 | 28 | } |
29 | 29 | endwhile; |
@@ -35,6 +35,6 @@ discard block |
||
35 | 35 | </div><!-- #primary --> |
36 | 36 | |
37 | 37 | <?php |
38 | -get_sidebar( 'content' ); |
|
38 | +get_sidebar('content'); |
|
39 | 39 | get_sidebar(); |
40 | 40 | get_footer(); |
41 | 41 | \ No newline at end of file |
@@ -57,7 +57,7 @@ |
||
57 | 57 | public function getCapCheck() |
58 | 58 | { |
59 | 59 | // need cap for non-AJAX admin requests |
60 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
60 | + if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
61 | 61 | // there's no specific caps for editing/creating transactions, |
62 | 62 | // so that's why we are using ee_edit_registrations |
63 | 63 | return new CapCheck('ee_edit_registrations', 'create_new_transaction'); |
@@ -20,60 +20,60 @@ |
||
20 | 20 | */ |
21 | 21 | class CreateTransactionCommand extends Command implements CommandRequiresCapCheckInterface |
22 | 22 | { |
23 | - /** |
|
24 | - * @var EE_Checkout $checkout |
|
25 | - */ |
|
26 | - protected $checkout; |
|
23 | + /** |
|
24 | + * @var EE_Checkout $checkout |
|
25 | + */ |
|
26 | + protected $checkout; |
|
27 | 27 | |
28 | - /** |
|
29 | - * @var array $transaction_details |
|
30 | - */ |
|
31 | - protected $transaction_details; |
|
28 | + /** |
|
29 | + * @var array $transaction_details |
|
30 | + */ |
|
31 | + protected $transaction_details; |
|
32 | 32 | |
33 | 33 | |
34 | - /** |
|
35 | - * CreateTransactionCommand constructor. |
|
36 | - * |
|
37 | - * @param EE_Checkout $checkout |
|
38 | - * @param array $transaction_details |
|
39 | - */ |
|
40 | - public function __construct(EE_Checkout $checkout = null, array $transaction_details = array()) |
|
41 | - { |
|
42 | - $this->checkout = $checkout; |
|
43 | - $this->transaction_details = $transaction_details; |
|
44 | - } |
|
34 | + /** |
|
35 | + * CreateTransactionCommand constructor. |
|
36 | + * |
|
37 | + * @param EE_Checkout $checkout |
|
38 | + * @param array $transaction_details |
|
39 | + */ |
|
40 | + public function __construct(EE_Checkout $checkout = null, array $transaction_details = array()) |
|
41 | + { |
|
42 | + $this->checkout = $checkout; |
|
43 | + $this->transaction_details = $transaction_details; |
|
44 | + } |
|
45 | 45 | |
46 | 46 | |
47 | - /** |
|
48 | - * @return CapCheckInterface |
|
49 | - * @throws InvalidDataTypeException |
|
50 | - */ |
|
51 | - public function getCapCheck() |
|
52 | - { |
|
53 | - // need cap for non-AJAX admin requests |
|
54 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
55 | - // there's no specific caps for editing/creating transactions, |
|
56 | - // so that's why we are using ee_edit_registrations |
|
57 | - return new CapCheck('ee_edit_registrations', 'create_new_transaction'); |
|
58 | - } |
|
59 | - return new PublicCapabilities('', 'create_new_transaction'); |
|
60 | - } |
|
47 | + /** |
|
48 | + * @return CapCheckInterface |
|
49 | + * @throws InvalidDataTypeException |
|
50 | + */ |
|
51 | + public function getCapCheck() |
|
52 | + { |
|
53 | + // need cap for non-AJAX admin requests |
|
54 | + if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
55 | + // there's no specific caps for editing/creating transactions, |
|
56 | + // so that's why we are using ee_edit_registrations |
|
57 | + return new CapCheck('ee_edit_registrations', 'create_new_transaction'); |
|
58 | + } |
|
59 | + return new PublicCapabilities('', 'create_new_transaction'); |
|
60 | + } |
|
61 | 61 | |
62 | 62 | |
63 | - /** |
|
64 | - * @return EE_Checkout |
|
65 | - */ |
|
66 | - public function checkout() |
|
67 | - { |
|
68 | - return $this->checkout; |
|
69 | - } |
|
63 | + /** |
|
64 | + * @return EE_Checkout |
|
65 | + */ |
|
66 | + public function checkout() |
|
67 | + { |
|
68 | + return $this->checkout; |
|
69 | + } |
|
70 | 70 | |
71 | 71 | |
72 | - /** |
|
73 | - * @return array |
|
74 | - */ |
|
75 | - public function transactionDetails() |
|
76 | - { |
|
77 | - return $this->transaction_details; |
|
78 | - } |
|
72 | + /** |
|
73 | + * @return array |
|
74 | + */ |
|
75 | + public function transactionDetails() |
|
76 | + { |
|
77 | + return $this->transaction_details; |
|
78 | + } |
|
79 | 79 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | public function getCapCheck() |
82 | 82 | { |
83 | 83 | // need cap for non-AJAX admin requests |
84 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
84 | + if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
85 | 85 | return new CapCheck('ee_edit_contacts', 'create_new_contact'); |
86 | 86 | } |
87 | 87 | return new PublicCapabilities('', 'create_new_contact'); |
@@ -19,62 +19,62 @@ |
||
19 | 19 | */ |
20 | 20 | class CreateAttendeeCommand extends Command implements CommandRequiresCapCheckInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * array of details where keys are names of EEM_Attendee model fields |
|
24 | - * |
|
25 | - * @var array $attendee_details |
|
26 | - */ |
|
27 | - protected $attendee_details; |
|
22 | + /** |
|
23 | + * array of details where keys are names of EEM_Attendee model fields |
|
24 | + * |
|
25 | + * @var array $attendee_details |
|
26 | + */ |
|
27 | + protected $attendee_details; |
|
28 | 28 | |
29 | - /** |
|
30 | - * an existing registration to associate this attendee with |
|
31 | - * |
|
32 | - * @var EE_Registration $registration |
|
33 | - */ |
|
34 | - protected $registration; |
|
29 | + /** |
|
30 | + * an existing registration to associate this attendee with |
|
31 | + * |
|
32 | + * @var EE_Registration $registration |
|
33 | + */ |
|
34 | + protected $registration; |
|
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * CreateAttendeeCommand constructor. |
|
39 | - * |
|
40 | - * @param array $attendee_details |
|
41 | - * @param EE_Registration $registration |
|
42 | - */ |
|
43 | - public function __construct(array $attendee_details, EE_Registration $registration) |
|
44 | - { |
|
45 | - $this->attendee_details = $attendee_details; |
|
46 | - $this->registration = $registration; |
|
47 | - } |
|
37 | + /** |
|
38 | + * CreateAttendeeCommand constructor. |
|
39 | + * |
|
40 | + * @param array $attendee_details |
|
41 | + * @param EE_Registration $registration |
|
42 | + */ |
|
43 | + public function __construct(array $attendee_details, EE_Registration $registration) |
|
44 | + { |
|
45 | + $this->attendee_details = $attendee_details; |
|
46 | + $this->registration = $registration; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * @return array |
|
52 | - */ |
|
53 | - public function attendeeDetails() |
|
54 | - { |
|
55 | - return $this->attendee_details; |
|
56 | - } |
|
50 | + /** |
|
51 | + * @return array |
|
52 | + */ |
|
53 | + public function attendeeDetails() |
|
54 | + { |
|
55 | + return $this->attendee_details; |
|
56 | + } |
|
57 | 57 | |
58 | 58 | |
59 | - /** |
|
60 | - * @return EE_Registration |
|
61 | - */ |
|
62 | - public function registration() |
|
63 | - { |
|
64 | - return $this->registration; |
|
65 | - } |
|
59 | + /** |
|
60 | + * @return EE_Registration |
|
61 | + */ |
|
62 | + public function registration() |
|
63 | + { |
|
64 | + return $this->registration; |
|
65 | + } |
|
66 | 66 | |
67 | 67 | |
68 | - /** |
|
69 | - * @return CapCheckInterface |
|
70 | - * @throws InvalidDataTypeException |
|
71 | - */ |
|
72 | - public function getCapCheck() |
|
73 | - { |
|
74 | - // need cap for non-AJAX admin requests |
|
75 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
76 | - return new CapCheck('ee_edit_contacts', 'create_new_contact'); |
|
77 | - } |
|
78 | - return new PublicCapabilities('', 'create_new_contact'); |
|
79 | - } |
|
68 | + /** |
|
69 | + * @return CapCheckInterface |
|
70 | + * @throws InvalidDataTypeException |
|
71 | + */ |
|
72 | + public function getCapCheck() |
|
73 | + { |
|
74 | + // need cap for non-AJAX admin requests |
|
75 | + if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
76 | + return new CapCheck('ee_edit_contacts', 'create_new_contact'); |
|
77 | + } |
|
78 | + return new PublicCapabilities('', 'create_new_contact'); |
|
79 | + } |
|
80 | 80 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <p> |
2 | 2 | <?php esc_html_e( |
3 | - 'Use this to control what the default will be for maximum tickets on an order when creating a new event.', |
|
4 | - 'event_espresso' |
|
5 | - ); ?> |
|
3 | + 'Use this to control what the default will be for maximum tickets on an order when creating a new event.', |
|
4 | + 'event_espresso' |
|
5 | + ); ?> |
|
6 | 6 | </p> |
7 | 7 | \ No newline at end of file |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $error_string = esc_html__('The following errors occurred:', 'event_espresso'); |
44 | 44 | foreach ($notices->getError() as $notice) { |
45 | 45 | if ($this->getThrowExceptions()) { |
46 | - $error_string .= '<br />' . $notice->message(); |
|
46 | + $error_string .= '<br />'.$notice->message(); |
|
47 | 47 | } else { |
48 | 48 | EE_Error::add_error( |
49 | 49 | $notice->message(), |
@@ -13,54 +13,54 @@ |
||
13 | 13 | */ |
14 | 14 | class ConvertNoticesToEeErrors extends NoticeConverter |
15 | 15 | { |
16 | - /** |
|
17 | - * Converts Notice objects into EE_Error notifications |
|
18 | - * |
|
19 | - * @param NoticesContainerInterface $notices |
|
20 | - * @throws EE_Error |
|
21 | - */ |
|
22 | - public function process(NoticesContainerInterface $notices) |
|
23 | - { |
|
24 | - $this->setNotices($notices); |
|
25 | - $notices = $this->getNotices(); |
|
26 | - if ($notices->hasAttention()) { |
|
27 | - foreach ($notices->getAttention() as $notice) { |
|
28 | - EE_Error::add_attention( |
|
29 | - $notice->message(), |
|
30 | - $notice->file(), |
|
31 | - $notice->func(), |
|
32 | - $notice->line() |
|
33 | - ); |
|
34 | - } |
|
35 | - } |
|
36 | - if ($notices->hasError()) { |
|
37 | - $error_string = esc_html__('The following errors occurred:', 'event_espresso'); |
|
38 | - foreach ($notices->getError() as $notice) { |
|
39 | - if ($this->getThrowExceptions()) { |
|
40 | - $error_string .= '<br />' . $notice->message(); |
|
41 | - } else { |
|
42 | - EE_Error::add_error( |
|
43 | - $notice->message(), |
|
44 | - $notice->file(), |
|
45 | - $notice->func(), |
|
46 | - $notice->line() |
|
47 | - ); |
|
48 | - } |
|
49 | - } |
|
50 | - if ($this->getThrowExceptions()) { |
|
51 | - throw new EE_Error($error_string); |
|
52 | - } |
|
53 | - } |
|
54 | - if ($notices->hasSuccess()) { |
|
55 | - foreach ($notices->getSuccess() as $notice) { |
|
56 | - EE_Error::add_success( |
|
57 | - $notice->message(), |
|
58 | - $notice->file(), |
|
59 | - $notice->func(), |
|
60 | - $notice->line() |
|
61 | - ); |
|
62 | - } |
|
63 | - } |
|
64 | - $this->clearNotices(); |
|
65 | - } |
|
16 | + /** |
|
17 | + * Converts Notice objects into EE_Error notifications |
|
18 | + * |
|
19 | + * @param NoticesContainerInterface $notices |
|
20 | + * @throws EE_Error |
|
21 | + */ |
|
22 | + public function process(NoticesContainerInterface $notices) |
|
23 | + { |
|
24 | + $this->setNotices($notices); |
|
25 | + $notices = $this->getNotices(); |
|
26 | + if ($notices->hasAttention()) { |
|
27 | + foreach ($notices->getAttention() as $notice) { |
|
28 | + EE_Error::add_attention( |
|
29 | + $notice->message(), |
|
30 | + $notice->file(), |
|
31 | + $notice->func(), |
|
32 | + $notice->line() |
|
33 | + ); |
|
34 | + } |
|
35 | + } |
|
36 | + if ($notices->hasError()) { |
|
37 | + $error_string = esc_html__('The following errors occurred:', 'event_espresso'); |
|
38 | + foreach ($notices->getError() as $notice) { |
|
39 | + if ($this->getThrowExceptions()) { |
|
40 | + $error_string .= '<br />' . $notice->message(); |
|
41 | + } else { |
|
42 | + EE_Error::add_error( |
|
43 | + $notice->message(), |
|
44 | + $notice->file(), |
|
45 | + $notice->func(), |
|
46 | + $notice->line() |
|
47 | + ); |
|
48 | + } |
|
49 | + } |
|
50 | + if ($this->getThrowExceptions()) { |
|
51 | + throw new EE_Error($error_string); |
|
52 | + } |
|
53 | + } |
|
54 | + if ($notices->hasSuccess()) { |
|
55 | + foreach ($notices->getSuccess() as $notice) { |
|
56 | + EE_Error::add_success( |
|
57 | + $notice->message(), |
|
58 | + $notice->file(), |
|
59 | + $notice->func(), |
|
60 | + $notice->line() |
|
61 | + ); |
|
62 | + } |
|
63 | + } |
|
64 | + $this->clearNotices(); |
|
65 | + } |
|
66 | 66 | } |
@@ -98,7 +98,7 @@ |
||
98 | 98 | { |
99 | 99 | sort($EVT_ID); |
100 | 100 | $EVT_ID = implode(',', array_unique($EVT_ID)); |
101 | - return md5($messenger . $message_type . $EVT_ID); |
|
101 | + return md5($messenger.$message_type.$EVT_ID); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 |
@@ -10,114 +10,114 @@ |
||
10 | 10 | */ |
11 | 11 | class EE_Message_Template_Group_Collection extends EE_Object_Collection |
12 | 12 | { |
13 | - /** |
|
14 | - * EE_Message_Template_Group_Collection constructor. |
|
15 | - */ |
|
16 | - public function __construct() |
|
17 | - { |
|
18 | - $this->interface = 'EE_Message_Template_Group'; |
|
19 | - } |
|
13 | + /** |
|
14 | + * EE_Message_Template_Group_Collection constructor. |
|
15 | + */ |
|
16 | + public function __construct() |
|
17 | + { |
|
18 | + $this->interface = 'EE_Message_Template_Group'; |
|
19 | + } |
|
20 | 20 | |
21 | 21 | |
22 | - /** |
|
23 | - * Adds the Message Template Group object to the repository. |
|
24 | - * |
|
25 | - * @param $message_template_group |
|
26 | - * @param array|int $EVT_ID Some templates are specific to EVT, so this is provided as a way of |
|
27 | - * indexing the template by key. If this template is shared among multiple events then |
|
28 | - * include the events as an array. |
|
29 | - * @return bool |
|
30 | - */ |
|
31 | - public function add($message_template_group, $EVT_ID = array()): bool |
|
32 | - { |
|
33 | - $EVT_ID = is_array($EVT_ID) ? $EVT_ID : (array) $EVT_ID; |
|
34 | - if ($message_template_group instanceof $this->interface) { |
|
35 | - $data['key'] = $this->getKey( |
|
36 | - $message_template_group->messenger(), |
|
37 | - $message_template_group->message_type(), |
|
38 | - $EVT_ID |
|
39 | - ); |
|
40 | - return parent::add($message_template_group, $data); |
|
41 | - } |
|
42 | - return false; |
|
43 | - } |
|
22 | + /** |
|
23 | + * Adds the Message Template Group object to the repository. |
|
24 | + * |
|
25 | + * @param $message_template_group |
|
26 | + * @param array|int $EVT_ID Some templates are specific to EVT, so this is provided as a way of |
|
27 | + * indexing the template by key. If this template is shared among multiple events then |
|
28 | + * include the events as an array. |
|
29 | + * @return bool |
|
30 | + */ |
|
31 | + public function add($message_template_group, $EVT_ID = array()): bool |
|
32 | + { |
|
33 | + $EVT_ID = is_array($EVT_ID) ? $EVT_ID : (array) $EVT_ID; |
|
34 | + if ($message_template_group instanceof $this->interface) { |
|
35 | + $data['key'] = $this->getKey( |
|
36 | + $message_template_group->messenger(), |
|
37 | + $message_template_group->message_type(), |
|
38 | + $EVT_ID |
|
39 | + ); |
|
40 | + return parent::add($message_template_group, $data); |
|
41 | + } |
|
42 | + return false; |
|
43 | + } |
|
44 | 44 | |
45 | 45 | |
46 | - /** |
|
47 | - * This retrieves any EE_Message_Template_Group in the repo by its ID. |
|
48 | - * |
|
49 | - * @param $GRP_ID |
|
50 | - * @return EE_Message_Template_Group | null |
|
51 | - */ |
|
52 | - public function get_by_ID($GRP_ID) |
|
53 | - { |
|
54 | - $this->rewind(); |
|
55 | - while ($this->valid()) { |
|
56 | - if ($this->current()->ID() === $GRP_ID) { |
|
57 | - /** @var EE_Message_Template_Group $message_template_group */ |
|
58 | - $message_template_group = $this->current(); |
|
59 | - $this->rewind(); |
|
60 | - return $message_template_group; |
|
61 | - } |
|
62 | - $this->next(); |
|
63 | - } |
|
64 | - return null; |
|
65 | - } |
|
46 | + /** |
|
47 | + * This retrieves any EE_Message_Template_Group in the repo by its ID. |
|
48 | + * |
|
49 | + * @param $GRP_ID |
|
50 | + * @return EE_Message_Template_Group | null |
|
51 | + */ |
|
52 | + public function get_by_ID($GRP_ID) |
|
53 | + { |
|
54 | + $this->rewind(); |
|
55 | + while ($this->valid()) { |
|
56 | + if ($this->current()->ID() === $GRP_ID) { |
|
57 | + /** @var EE_Message_Template_Group $message_template_group */ |
|
58 | + $message_template_group = $this->current(); |
|
59 | + $this->rewind(); |
|
60 | + return $message_template_group; |
|
61 | + } |
|
62 | + $this->next(); |
|
63 | + } |
|
64 | + return null; |
|
65 | + } |
|
66 | 66 | |
67 | 67 | |
68 | - /** |
|
69 | - * Generates a hash used to identify a given Message Template Group. |
|
70 | - * |
|
71 | - * @param string $messenger The EE_messenger->name |
|
72 | - * @param string $message_type The EE_message_type->name |
|
73 | - * @param int $EVT_ID Optional. If the template is for a specific EVT then that should be included. |
|
74 | - * @deprecated 4.9.40.rc.017 Use getKey instead. |
|
75 | - * @return string |
|
76 | - */ |
|
77 | - public function get_key($messenger, $message_type, $EVT_ID = 0) |
|
78 | - { |
|
79 | - $EVT_ID = (array) $EVT_ID; |
|
80 | - return $this->getKey($messenger, $message_type, $EVT_ID); |
|
81 | - } |
|
68 | + /** |
|
69 | + * Generates a hash used to identify a given Message Template Group. |
|
70 | + * |
|
71 | + * @param string $messenger The EE_messenger->name |
|
72 | + * @param string $message_type The EE_message_type->name |
|
73 | + * @param int $EVT_ID Optional. If the template is for a specific EVT then that should be included. |
|
74 | + * @deprecated 4.9.40.rc.017 Use getKey instead. |
|
75 | + * @return string |
|
76 | + */ |
|
77 | + public function get_key($messenger, $message_type, $EVT_ID = 0) |
|
78 | + { |
|
79 | + $EVT_ID = (array) $EVT_ID; |
|
80 | + return $this->getKey($messenger, $message_type, $EVT_ID); |
|
81 | + } |
|
82 | 82 | |
83 | 83 | |
84 | - /** |
|
85 | - * Generates a hash used to identify a given Message Template Group |
|
86 | - * @param string $messenger The EE_messenger->name |
|
87 | - * @param string $message_type The EE_message_type->name |
|
88 | - * @param array $EVT_ID Optional. If the template is for a specific EVT_ID (or events) then that should |
|
89 | - * be included. |
|
90 | - * @since 4.9.40.rc.017 |
|
91 | - * @return string |
|
92 | - */ |
|
93 | - public function getKey($messenger, $message_type, array $EVT_ID = array()) |
|
94 | - { |
|
95 | - sort($EVT_ID); |
|
96 | - $EVT_ID = implode(',', array_unique($EVT_ID)); |
|
97 | - return md5($messenger . $message_type . $EVT_ID); |
|
98 | - } |
|
84 | + /** |
|
85 | + * Generates a hash used to identify a given Message Template Group |
|
86 | + * @param string $messenger The EE_messenger->name |
|
87 | + * @param string $message_type The EE_message_type->name |
|
88 | + * @param array $EVT_ID Optional. If the template is for a specific EVT_ID (or events) then that should |
|
89 | + * be included. |
|
90 | + * @since 4.9.40.rc.017 |
|
91 | + * @return string |
|
92 | + */ |
|
93 | + public function getKey($messenger, $message_type, array $EVT_ID = array()) |
|
94 | + { |
|
95 | + sort($EVT_ID); |
|
96 | + $EVT_ID = implode(',', array_unique($EVT_ID)); |
|
97 | + return md5($messenger . $message_type . $EVT_ID); |
|
98 | + } |
|
99 | 99 | |
100 | 100 | |
101 | - /** |
|
102 | - * This returns a saved EE_Message_Template_Group object if there is one in the repository indexed by a key matching |
|
103 | - * the given string. |
|
104 | - * |
|
105 | - * @param string $key @see EE_Message_Template_Group::get_key() to setup a key formatted for searching. |
|
106 | - * @return null|EE_Message_Template_Group |
|
107 | - */ |
|
108 | - public function get_by_key($key) |
|
109 | - { |
|
110 | - $this->rewind(); |
|
111 | - while ($this->valid()) { |
|
112 | - $data = $this->getInfo(); |
|
113 | - if (isset($data['key']) && $data['key'] === $key) { |
|
114 | - /** @var EE_Message_Template_Group $message_template_group */ |
|
115 | - $message_template_group = $this->current(); |
|
116 | - $this->rewind(); |
|
117 | - return $message_template_group; |
|
118 | - } |
|
119 | - $this->next(); |
|
120 | - } |
|
121 | - return null; |
|
122 | - } |
|
101 | + /** |
|
102 | + * This returns a saved EE_Message_Template_Group object if there is one in the repository indexed by a key matching |
|
103 | + * the given string. |
|
104 | + * |
|
105 | + * @param string $key @see EE_Message_Template_Group::get_key() to setup a key formatted for searching. |
|
106 | + * @return null|EE_Message_Template_Group |
|
107 | + */ |
|
108 | + public function get_by_key($key) |
|
109 | + { |
|
110 | + $this->rewind(); |
|
111 | + while ($this->valid()) { |
|
112 | + $data = $this->getInfo(); |
|
113 | + if (isset($data['key']) && $data['key'] === $key) { |
|
114 | + /** @var EE_Message_Template_Group $message_template_group */ |
|
115 | + $message_template_group = $this->current(); |
|
116 | + $this->rewind(); |
|
117 | + return $message_template_group; |
|
118 | + } |
|
119 | + $this->next(); |
|
120 | + } |
|
121 | + return null; |
|
122 | + } |
|
123 | 123 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->_form_section->html_id(), |
19 | 19 | $this->_form_section->html_class(), |
20 | 20 | $this->_form_section->html_style() |
21 | - ) . EEH_HTML::tbody(); |
|
21 | + ).EEH_HTML::tbody(); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function layout_form_end($additional_args = array()) |
33 | 33 | { |
34 | - return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id()); |
|
34 | + return EEH_HTML::tbodyx().EEH_HTML::tablex($this->_form_section->html_id()); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | } else { |
51 | 51 | $html_for_input = $input->get_html_for_input(); |
52 | 52 | $html_for_input .= $input->get_html_for_errors() != '' |
53 | - ? EEH_HTML::nl() . $input->get_html_for_errors() |
|
53 | + ? EEH_HTML::nl().$input->get_html_for_errors() |
|
54 | 54 | : ''; |
55 | - $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : ''; |
|
55 | + $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl().$input->get_html_for_help() : ''; |
|
56 | 56 | $html .= EEH_HTML::tr( |
57 | - EEH_HTML::th($input->get_html_for_label()) . |
|
57 | + EEH_HTML::th($input->get_html_for_label()). |
|
58 | 58 | EEH_HTML::td($html_for_input) |
59 | 59 | ); |
60 | 60 | } |
@@ -2,98 +2,98 @@ |
||
2 | 2 | |
3 | 3 | class EE_Two_Column_Layout extends EE_Form_Section_Layout_Base |
4 | 4 | { |
5 | - /** |
|
6 | - * @param EE_Form_Section_Proper $form |
|
7 | - */ |
|
8 | - public function _construct_finalize(EE_Form_Section_Proper $form) |
|
9 | - { |
|
10 | - parent::_construct_finalize($form); |
|
11 | - $this->_form_section->set_html_class('ee-two-column-layout'); |
|
12 | - } |
|
5 | + /** |
|
6 | + * @param EE_Form_Section_Proper $form |
|
7 | + */ |
|
8 | + public function _construct_finalize(EE_Form_Section_Proper $form) |
|
9 | + { |
|
10 | + parent::_construct_finalize($form); |
|
11 | + $this->_form_section->set_html_class('ee-two-column-layout'); |
|
12 | + } |
|
13 | 13 | |
14 | 14 | |
15 | - /** |
|
16 | - * Should be used to start teh form section (Eg a table tag, or a div tag, etc.) |
|
17 | - * |
|
18 | - * @param array $additional_args |
|
19 | - * @return string |
|
20 | - * @throws EE_Error |
|
21 | - */ |
|
22 | - public function layout_form_begin($additional_args = array()) |
|
23 | - { |
|
24 | - return $this->display_form_wide_errors() |
|
25 | - . EEH_HTML::table( |
|
26 | - '', |
|
27 | - $this->_form_section->html_id(), |
|
28 | - $this->_form_section->html_class(), |
|
29 | - $this->_form_section->html_style() |
|
30 | - ) . EEH_HTML::tbody(); |
|
31 | - } |
|
15 | + /** |
|
16 | + * Should be used to start teh form section (Eg a table tag, or a div tag, etc.) |
|
17 | + * |
|
18 | + * @param array $additional_args |
|
19 | + * @return string |
|
20 | + * @throws EE_Error |
|
21 | + */ |
|
22 | + public function layout_form_begin($additional_args = array()) |
|
23 | + { |
|
24 | + return $this->display_form_wide_errors() |
|
25 | + . EEH_HTML::table( |
|
26 | + '', |
|
27 | + $this->_form_section->html_id(), |
|
28 | + $this->_form_section->html_class(), |
|
29 | + $this->_form_section->html_style() |
|
30 | + ) . EEH_HTML::tbody(); |
|
31 | + } |
|
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | - /** |
|
36 | - * Should be used to end the form section (eg a /table tag, or a /div tag, etc) |
|
37 | - * |
|
38 | - * @param array $additional_args |
|
39 | - * @return string |
|
40 | - */ |
|
41 | - public function layout_form_end($additional_args = array()) |
|
42 | - { |
|
43 | - return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id()); |
|
44 | - } |
|
35 | + /** |
|
36 | + * Should be used to end the form section (eg a /table tag, or a /div tag, etc) |
|
37 | + * |
|
38 | + * @param array $additional_args |
|
39 | + * @return string |
|
40 | + */ |
|
41 | + public function layout_form_end($additional_args = array()) |
|
42 | + { |
|
43 | + return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id()); |
|
44 | + } |
|
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * Lays out the row for the input, including label and errors |
|
50 | - * |
|
51 | - * @param EE_Form_Input_Base $input |
|
52 | - * @return string |
|
53 | - */ |
|
54 | - public function layout_input($input) |
|
55 | - { |
|
56 | - $html = ''; |
|
57 | - if ($input instanceof EE_Hidden_Input) { |
|
58 | - $html .= $input->get_html_for_input(); |
|
59 | - } else { |
|
60 | - $html_for_input = $input->get_html_for_input(); |
|
61 | - $html_for_input .= $input->get_html_for_errors() != '' |
|
62 | - ? EEH_HTML::nl() . $input->get_html_for_errors() |
|
63 | - : ''; |
|
64 | - $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : ''; |
|
65 | - $html .= EEH_HTML::tr( |
|
66 | - EEH_HTML::th($input->get_html_for_label()) . |
|
67 | - EEH_HTML::td($html_for_input) |
|
68 | - ); |
|
69 | - } |
|
70 | - return $html; |
|
71 | - } |
|
48 | + /** |
|
49 | + * Lays out the row for the input, including label and errors |
|
50 | + * |
|
51 | + * @param EE_Form_Input_Base $input |
|
52 | + * @return string |
|
53 | + */ |
|
54 | + public function layout_input($input) |
|
55 | + { |
|
56 | + $html = ''; |
|
57 | + if ($input instanceof EE_Hidden_Input) { |
|
58 | + $html .= $input->get_html_for_input(); |
|
59 | + } else { |
|
60 | + $html_for_input = $input->get_html_for_input(); |
|
61 | + $html_for_input .= $input->get_html_for_errors() != '' |
|
62 | + ? EEH_HTML::nl() . $input->get_html_for_errors() |
|
63 | + : ''; |
|
64 | + $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : ''; |
|
65 | + $html .= EEH_HTML::tr( |
|
66 | + EEH_HTML::th($input->get_html_for_label()) . |
|
67 | + EEH_HTML::td($html_for_input) |
|
68 | + ); |
|
69 | + } |
|
70 | + return $html; |
|
71 | + } |
|
72 | 72 | |
73 | 73 | |
74 | - /** |
|
75 | - * Lays out a row for the subsection. Please note that if you have a subsection which you don't want wrapped in |
|
76 | - * a 'tr' and 'td' with a colspan=2, you should either: |
|
77 | - * - set the layout strategy options 'add_wrapper' value to false |
|
78 | - * - use a different layout strategy, like EE_No_Layout, EE_Template_Layout, or EE_Div_Per_Section_Layout, |
|
79 | - * and create subsections using EE_Two_Column_Layout for everywhere you want the two-column layout, |
|
80 | - * and then other subsections can be outside the EE_Two_Column_Layout table. |
|
81 | - * |
|
82 | - * @param EE_Form_Section_Proper $form_section |
|
83 | - * @return string |
|
84 | - * @throws EE_Error |
|
85 | - */ |
|
86 | - public function layout_subsection($form_section) |
|
87 | - { |
|
88 | - if ($form_section instanceof EE_Form_Section_Proper) { |
|
89 | - $html = $form_section->get_html(); |
|
90 | - return ! empty($html) ? EEH_HTML::no_row($html) : ''; |
|
91 | - } |
|
92 | - if ($form_section instanceof EE_Form_Section_HTML) { |
|
93 | - return $form_section->addWrapper() |
|
94 | - ? EEH_HTML::no_row($form_section->get_html()) |
|
95 | - : $form_section->get_html(); |
|
96 | - } |
|
97 | - return ''; |
|
98 | - } |
|
74 | + /** |
|
75 | + * Lays out a row for the subsection. Please note that if you have a subsection which you don't want wrapped in |
|
76 | + * a 'tr' and 'td' with a colspan=2, you should either: |
|
77 | + * - set the layout strategy options 'add_wrapper' value to false |
|
78 | + * - use a different layout strategy, like EE_No_Layout, EE_Template_Layout, or EE_Div_Per_Section_Layout, |
|
79 | + * and create subsections using EE_Two_Column_Layout for everywhere you want the two-column layout, |
|
80 | + * and then other subsections can be outside the EE_Two_Column_Layout table. |
|
81 | + * |
|
82 | + * @param EE_Form_Section_Proper $form_section |
|
83 | + * @return string |
|
84 | + * @throws EE_Error |
|
85 | + */ |
|
86 | + public function layout_subsection($form_section) |
|
87 | + { |
|
88 | + if ($form_section instanceof EE_Form_Section_Proper) { |
|
89 | + $html = $form_section->get_html(); |
|
90 | + return ! empty($html) ? EEH_HTML::no_row($html) : ''; |
|
91 | + } |
|
92 | + if ($form_section instanceof EE_Form_Section_HTML) { |
|
93 | + return $form_section->addWrapper() |
|
94 | + ? EEH_HTML::no_row($form_section->get_html()) |
|
95 | + : $form_section->get_html(); |
|
96 | + } |
|
97 | + return ''; |
|
98 | + } |
|
99 | 99 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function __construct($validation_error_message = '') |
25 | 25 | { |
26 | - if (! $validation_error_message) { |
|
26 | + if ( ! $validation_error_message) { |
|
27 | 27 | $validation_error_message = esc_html__('Please enter a valid email address.', 'event_espresso'); |
28 | 28 | } |
29 | 29 | parent::__construct($validation_error_message); |
@@ -15,72 +15,72 @@ |
||
15 | 15 | */ |
16 | 16 | class EE_Email_Validation_Strategy extends EE_Text_Validation_Strategy |
17 | 17 | { |
18 | - /** |
|
19 | - * @param string $validation_error_message |
|
20 | - */ |
|
21 | - public function __construct($validation_error_message = '') |
|
22 | - { |
|
23 | - if (! $validation_error_message) { |
|
24 | - $validation_error_message = esc_html__('Please enter a valid email address.', 'event_espresso'); |
|
25 | - } |
|
26 | - parent::__construct($validation_error_message); |
|
27 | - } |
|
18 | + /** |
|
19 | + * @param string $validation_error_message |
|
20 | + */ |
|
21 | + public function __construct($validation_error_message = '') |
|
22 | + { |
|
23 | + if (! $validation_error_message) { |
|
24 | + $validation_error_message = esc_html__('Please enter a valid email address.', 'event_espresso'); |
|
25 | + } |
|
26 | + parent::__construct($validation_error_message); |
|
27 | + } |
|
28 | 28 | |
29 | 29 | |
30 | 30 | |
31 | - /** |
|
32 | - * just checks the field isn't blank |
|
33 | - * |
|
34 | - * @param $normalized_value |
|
35 | - * @return bool |
|
36 | - * @throws InvalidArgumentException |
|
37 | - * @throws InvalidInterfaceException |
|
38 | - * @throws InvalidDataTypeException |
|
39 | - * @throws EE_Validation_Error |
|
40 | - */ |
|
41 | - public function validate($normalized_value) |
|
42 | - { |
|
43 | - if ($normalized_value && ! $this->_validate_email($normalized_value)) { |
|
44 | - throw new EE_Validation_Error($this->get_validation_error_message(), 'required'); |
|
45 | - } |
|
46 | - return true; |
|
47 | - } |
|
31 | + /** |
|
32 | + * just checks the field isn't blank |
|
33 | + * |
|
34 | + * @param $normalized_value |
|
35 | + * @return bool |
|
36 | + * @throws InvalidArgumentException |
|
37 | + * @throws InvalidInterfaceException |
|
38 | + * @throws InvalidDataTypeException |
|
39 | + * @throws EE_Validation_Error |
|
40 | + */ |
|
41 | + public function validate($normalized_value) |
|
42 | + { |
|
43 | + if ($normalized_value && ! $this->_validate_email($normalized_value)) { |
|
44 | + throw new EE_Validation_Error($this->get_validation_error_message(), 'required'); |
|
45 | + } |
|
46 | + return true; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | 50 | |
51 | - /** |
|
52 | - * @return array |
|
53 | - */ |
|
54 | - public function get_jquery_validation_rule_array() |
|
55 | - { |
|
56 | - return array('email' => true, 'messages' => array('email' => $this->get_validation_error_message())); |
|
57 | - } |
|
51 | + /** |
|
52 | + * @return array |
|
53 | + */ |
|
54 | + public function get_jquery_validation_rule_array() |
|
55 | + { |
|
56 | + return array('email' => true, 'messages' => array('email' => $this->get_validation_error_message())); |
|
57 | + } |
|
58 | 58 | |
59 | 59 | |
60 | 60 | |
61 | - /** |
|
62 | - * Validate an email address. |
|
63 | - * Provide email address (raw input) |
|
64 | - * |
|
65 | - * @param $email |
|
66 | - * @return bool of whether the email is valid or not |
|
67 | - * @throws InvalidArgumentException |
|
68 | - * @throws InvalidInterfaceException |
|
69 | - * @throws InvalidDataTypeException |
|
70 | - * @throws EE_Validation_Error |
|
71 | - */ |
|
72 | - private function _validate_email($email) |
|
73 | - { |
|
74 | - try { |
|
75 | - EmailAddressFactory::create($email); |
|
76 | - } catch (EmailValidationException $e) { |
|
77 | - throw new EE_Validation_Error( |
|
78 | - $e->getMessage(), |
|
79 | - 'invalid_email', |
|
80 | - $this->_input, |
|
81 | - $e |
|
82 | - ); |
|
83 | - } |
|
84 | - return true; |
|
85 | - } |
|
61 | + /** |
|
62 | + * Validate an email address. |
|
63 | + * Provide email address (raw input) |
|
64 | + * |
|
65 | + * @param $email |
|
66 | + * @return bool of whether the email is valid or not |
|
67 | + * @throws InvalidArgumentException |
|
68 | + * @throws InvalidInterfaceException |
|
69 | + * @throws InvalidDataTypeException |
|
70 | + * @throws EE_Validation_Error |
|
71 | + */ |
|
72 | + private function _validate_email($email) |
|
73 | + { |
|
74 | + try { |
|
75 | + EmailAddressFactory::create($email); |
|
76 | + } catch (EmailValidationException $e) { |
|
77 | + throw new EE_Validation_Error( |
|
78 | + $e->getMessage(), |
|
79 | + 'invalid_email', |
|
80 | + $this->_input, |
|
81 | + $e |
|
82 | + ); |
|
83 | + } |
|
84 | + return true; |
|
85 | + } |
|
86 | 86 | } |
@@ -19,16 +19,16 @@ |
||
19 | 19 | 'The green colored gear %s indicates that this messenger is currently active.', |
20 | 20 | 'event_espresso' |
21 | 21 | ), |
22 | - '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-active.png' . '"' |
|
23 | - . ' alt="' . esc_attr__('Active Email Tab', 'event_espresso') . '" />' |
|
22 | + '<img class="inline-text" src="'.EE_MSG_ASSETS_URL.'images/email-tab-active.png'.'"' |
|
23 | + . ' alt="'.esc_attr__('Active Email Tab', 'event_espresso').'" />' |
|
24 | 24 | ); |
25 | 25 | printf( |
26 | 26 | esc_html__( |
27 | 27 | ' The white colored gear %s indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.', |
28 | 28 | 'event_espresso' |
29 | 29 | ), |
30 | - '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-inactive.png' |
|
31 | - . '" alt="' . esc_attr__('Inactive Email Tab', 'event_espresso') . '" />' |
|
30 | + '<img class="inline-text" src="'.EE_MSG_ASSETS_URL.'images/email-tab-inactive.png' |
|
31 | + . '" alt="'.esc_attr__('Inactive Email Tab', 'event_espresso').'" />' |
|
32 | 32 | ); ?> |
33 | 33 | </p> |
34 | 34 | <p> |
@@ -3,79 +3,79 @@ |
||
3 | 3 | </p> |
4 | 4 | <p> |
5 | 5 | <?php esc_html_e( |
6 | - 'You can select Messengers via the tabs across the top of the settings page. The available messengers you see depends on what version of Event Espresso you have and what addons are installed. Every install include an "Email" messenger tab. When you click one of those tabs it will display that messenger.', |
|
7 | - 'event_espresso' |
|
8 | - ); ?> |
|
6 | + 'You can select Messengers via the tabs across the top of the settings page. The available messengers you see depends on what version of Event Espresso you have and what addons are installed. Every install include an "Email" messenger tab. When you click one of those tabs it will display that messenger.', |
|
7 | + 'event_espresso' |
|
8 | + ); ?> |
|
9 | 9 | </p> |
10 | 10 | <p> |
11 | 11 | <?php esc_html_e( |
12 | - 'There are two ways to determine whether a messenger is active or not. The first way is via the messenger tab itself.', |
|
13 | - 'event_espresso' |
|
14 | - ); ?> |
|
12 | + 'There are two ways to determine whether a messenger is active or not. The first way is via the messenger tab itself.', |
|
13 | + 'event_espresso' |
|
14 | + ); ?> |
|
15 | 15 | </p> |
16 | 16 | <p> |
17 | 17 | <?php printf( |
18 | - esc_html__( |
|
19 | - 'The green colored gear %s indicates that this messenger is currently active.', |
|
20 | - 'event_espresso' |
|
21 | - ), |
|
22 | - '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-active.png' . '"' |
|
23 | - . ' alt="' . esc_attr__('Active Email Tab', 'event_espresso') . '" />' |
|
24 | - ); |
|
25 | - printf( |
|
26 | - esc_html__( |
|
27 | - ' The white colored gear %s indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.', |
|
28 | - 'event_espresso' |
|
29 | - ), |
|
30 | - '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-inactive.png' |
|
31 | - . '" alt="' . esc_attr__('Inactive Email Tab', 'event_espresso') . '" />' |
|
32 | - ); ?> |
|
18 | + esc_html__( |
|
19 | + 'The green colored gear %s indicates that this messenger is currently active.', |
|
20 | + 'event_espresso' |
|
21 | + ), |
|
22 | + '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-active.png' . '"' |
|
23 | + . ' alt="' . esc_attr__('Active Email Tab', 'event_espresso') . '" />' |
|
24 | + ); |
|
25 | + printf( |
|
26 | + esc_html__( |
|
27 | + ' The white colored gear %s indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.', |
|
28 | + 'event_espresso' |
|
29 | + ), |
|
30 | + '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-inactive.png' |
|
31 | + . '" alt="' . esc_attr__('Inactive Email Tab', 'event_espresso') . '" />' |
|
32 | + ); ?> |
|
33 | 33 | </p> |
34 | 34 | <p> |
35 | 35 | <?php esc_html_e( |
36 | - 'The second way to determine whether a messenger is active or not is via the "on/off" button in the top right corner of the active messenger displayed content:', |
|
37 | - 'event_espresso' |
|
38 | - ); ?> |
|
36 | + 'The second way to determine whether a messenger is active or not is via the "on/off" button in the top right corner of the active messenger displayed content:', |
|
37 | + 'event_espresso' |
|
38 | + ); ?> |
|
39 | 39 | </p> |
40 | 40 | <p> |
41 | 41 | <?php printf( |
42 | - esc_html__( |
|
43 | - '%1$s means of course that the messenger is active and %2$s means the messenger is inactive.', |
|
44 | - 'event_espresso' |
|
45 | - ), |
|
46 | - '<div class="ee-switch">' |
|
47 | - . '<input class="ee-switch__input" type="checkbox" checked disabled>' |
|
48 | - . '<label class="ee-switch__toggle" for="ee-on-off-toggle-on" style="min-width:unset !important; padding: 0;"></label>' |
|
49 | - . '</div>', |
|
50 | - '<div class="ee-switch">' |
|
51 | - . '<input class="ee-switch__input" type="checkbox" disabled>' |
|
52 | - . '<label class="ee-switch__toggle" for="ee-on-off-toggle-off" style="min-width:unset !important; padding: 0;"></label>' |
|
53 | - . '</div>' |
|
54 | - ); ?> |
|
42 | + esc_html__( |
|
43 | + '%1$s means of course that the messenger is active and %2$s means the messenger is inactive.', |
|
44 | + 'event_espresso' |
|
45 | + ), |
|
46 | + '<div class="ee-switch">' |
|
47 | + . '<input class="ee-switch__input" type="checkbox" checked disabled>' |
|
48 | + . '<label class="ee-switch__toggle" for="ee-on-off-toggle-on" style="min-width:unset !important; padding: 0;"></label>' |
|
49 | + . '</div>', |
|
50 | + '<div class="ee-switch">' |
|
51 | + . '<input class="ee-switch__input" type="checkbox" disabled>' |
|
52 | + . '<label class="ee-switch__toggle" for="ee-on-off-toggle-off" style="min-width:unset !important; padding: 0;"></label>' |
|
53 | + . '</div>' |
|
54 | + ); ?> |
|
55 | 55 | </p> |
56 | 56 | <p> |
57 | 57 | <?php |
58 | - esc_html_e( |
|
59 | - 'The on/off toggle is also what you use to activate or deactivate a messenger.', |
|
60 | - 'event_espresso' |
|
61 | - ); ?> |
|
58 | + esc_html_e( |
|
59 | + 'The on/off toggle is also what you use to activate or deactivate a messenger.', |
|
60 | + 'event_espresso' |
|
61 | + ); ?> |
|
62 | 62 | </p> |
63 | 63 | <p> |
64 | 64 | <?php esc_html_e( |
65 | - 'What happens when you click the toggle to activate is the messenger is activated and the system determines what default message types are activated with the messenger. Then, if there are any default settings for either the messenger or message types those settings are saved. Next, the system will generate any default templates (if none have been generated before, if there are previously generated templates then they are reactivated). Finally, you will see the display change to reflect that the messenger is active. If the messenger has settings you can modify them then. Any message types that have settings will also automatically expand so you can see the default settings and make any changes as necessary to fit your needs. Usually the defaults are sufficient however.', |
|
66 | - 'event_espresso' |
|
67 | - ); ?> |
|
65 | + 'What happens when you click the toggle to activate is the messenger is activated and the system determines what default message types are activated with the messenger. Then, if there are any default settings for either the messenger or message types those settings are saved. Next, the system will generate any default templates (if none have been generated before, if there are previously generated templates then they are reactivated). Finally, you will see the display change to reflect that the messenger is active. If the messenger has settings you can modify them then. Any message types that have settings will also automatically expand so you can see the default settings and make any changes as necessary to fit your needs. Usually the defaults are sufficient however.', |
|
66 | + 'event_espresso' |
|
67 | + ); ?> |
|
68 | 68 | </p> |
69 | 69 | <p> |
70 | 70 | <?php esc_html_e( |
71 | - 'When you deactivate a messenger, the system will first check if there are any custom event templates for that messenger. If there are you will be unable to deactivate the messenger. This is a fail safe to make sure you know that no messages will go out for those specific events so you don\'t accidentally deactivate. If this check passes, then the system will deactivate any global templates for that messenger (note the templates are not erased, they just become inactive, so if you decide to reactivate the messenger later all your customizations are preserved). Then the display will change to reflect the deactivation.', |
|
72 | - 'event_espresso' |
|
73 | - ); ?> |
|
71 | + 'When you deactivate a messenger, the system will first check if there are any custom event templates for that messenger. If there are you will be unable to deactivate the messenger. This is a fail safe to make sure you know that no messages will go out for those specific events so you don\'t accidentally deactivate. If this check passes, then the system will deactivate any global templates for that messenger (note the templates are not erased, they just become inactive, so if you decide to reactivate the messenger later all your customizations are preserved). Then the display will change to reflect the deactivation.', |
|
72 | + 'event_espresso' |
|
73 | + ); ?> |
|
74 | 74 | </p> |
75 | 75 | <p> |
76 | 76 | <strong><?php esc_html_e('Important', 'event_espresso'); ?></strong><br /> |
77 | 77 | <?php esc_html_e( |
78 | - 'Although customizations made to global templates are preserved when a messenger is deactivated, any settings for that messenger (or the message types that were attached to it) are lost on deactivation. Also, once you deactivate a messenger, no more messages will be delivered using that messenger for any of your events.', |
|
79 | - 'event_espresso' |
|
80 | - ); ?> |
|
78 | + 'Although customizations made to global templates are preserved when a messenger is deactivated, any settings for that messenger (or the message types that were attached to it) are lost on deactivation. Also, once you deactivate a messenger, no more messages will be delivered using that messenger for any of your events.', |
|
79 | + 'event_espresso' |
|
80 | + ); ?> |
|
81 | 81 | </p> |