@@ -2,19 +2,19 @@ |
||
2 | 2 | <p> |
3 | 3 | <?php _e('The importer can be used to import event information into Event Espresso using a CSV file.', 'event_espresso'); ?> |
4 | 4 | </p> |
5 | -<h3><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso');?></h3> |
|
5 | +<h3><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso'); ?></h3> |
|
6 | 6 | <p> |
7 | 7 | <?php _e('To import Event Espresso data from another Event Espresso 4 install, export a CSV file from the admin Events overview page, or anywhere you can generate a CSV export file from. Then upload that file here (regardless of what type of information was exported).', 'event_espresso'); ?> |
8 | 8 | </p> |
9 | 9 | <p> |
10 | 10 | <?php _e('Note: its possible that data from the other site have the same IDs as data in this site. The importer recognizes that this data is from a different database and inserts new items for each item in the CSV file, regardless of whether its ID matches that of an item in this site\'s database or not. However, the importer also remembers the mapping from the old site\'s database to this site\'s database, and on subsequent CSV importers from that site, the data in this database will be updated instead of re-inserting new items.', 'event_espresso'); ?> |
11 | 11 | </p> |
12 | -<h3><?php _e("Importing from this Site", 'event_espresso');?></h3> |
|
13 | -<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso');?></p> |
|
12 | +<h3><?php _e("Importing from this Site", 'event_espresso'); ?></h3> |
|
13 | +<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso'); ?></p> |
|
14 | 14 | |
15 | - <h3><?php _e("Notes about Generating your own CSV Import Files", "event_espresso");?></h3> |
|
16 | - <p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso");?></p> |
|
17 | - <p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso");?></p> |
|
15 | + <h3><?php _e("Notes about Generating your own CSV Import Files", "event_espresso"); ?></h3> |
|
16 | + <p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso"); ?></p> |
|
17 | + <p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso"); ?></p> |
|
18 | 18 | <p><?php _e("In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, |
19 | - if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso");?></p> |
|
20 | - <p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso");?></p> |
|
21 | 19 | \ No newline at end of file |
20 | + if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso"); ?></p> |
|
21 | + <p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso"); ?></p> |
|
22 | 22 | \ No newline at end of file |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | ), |
84 | 84 | 7 => array( |
85 | 85 | 'content_id' => 'tkt-status-archived', |
86 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::archived, |
|
86 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::archived, |
|
87 | 87 | 'content' => $this->_ticket_status_legend(EE_Ticket::archived), |
88 | 88 | 'options' => array( |
89 | 89 | 'position' => array( |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | ), |
97 | 97 | 8 => array( |
98 | 98 | 'content_id' => 'tkt-status-expired', |
99 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::expired, |
|
99 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::expired, |
|
100 | 100 | 'content' => $this->_ticket_status_legend(EE_Ticket::expired), |
101 | 101 | 'options' => array( |
102 | 102 | 'position' => array( |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | ), |
110 | 110 | 9 => array( |
111 | 111 | 'content_id' => 'tkt-status-sold_out', |
112 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::sold_out, |
|
112 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::sold_out, |
|
113 | 113 | 'content' => $this->_ticket_status_legend(EE_Ticket::sold_out), |
114 | 114 | 'options' => array( |
115 | 115 | 'position' => array( |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ), |
123 | 123 | 10 => array( |
124 | 124 | 'content_id' => 'tkt-status-pending', |
125 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::pending, |
|
125 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::pending, |
|
126 | 126 | 'content' => $this->_ticket_status_legend(EE_Ticket::pending), |
127 | 127 | 'options' => array( |
128 | 128 | 'position' => array( |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ), |
136 | 136 | 11 => array( |
137 | 137 | 'content_id' => 'tkt-status-onsale', |
138 | - 'target' => '.ticket-row .tkt-status-' . EE_Ticket::onsale, |
|
138 | + 'target' => '.ticket-row .tkt-status-'.EE_Ticket::onsale, |
|
139 | 139 | 'content' => $this->_ticket_status_legend(EE_Ticket::onsale), |
140 | 140 | 'options' => array( |
141 | 141 | 'position' => array( |
@@ -178,8 +178,8 @@ discard block |
||
178 | 178 | |
179 | 179 | |
180 | 180 | private function _get_taxable_info_content() { |
181 | - $price_admin_link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default'), PRICING_ADMIN_URL ); |
|
182 | - return '<p>' . sprintf( __('Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)', 'event_espresso'), '<a href="' . $price_admin_link . '" title="' . esc_attr__('Pricing Admin Page', 'event_espresso') . '">', '</a>' ) . '</p>'; |
|
181 | + $price_admin_link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default'), PRICING_ADMIN_URL); |
|
182 | + return '<p>'.sprintf(__('Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)', 'event_espresso'), '<a href="'.$price_admin_link.'" title="'.esc_attr__('Pricing Admin Page', 'event_espresso').'">', '</a>').'</p>'; |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * @param EE_Ticket constant $status What status is set (by class) |
188 | 188 | * @return string The status legend with the related status highlighted |
189 | 189 | */ |
190 | - private function _ticket_status_legend( $status ) { |
|
190 | + private function _ticket_status_legend($status) { |
|
191 | 191 | |
192 | 192 | $status_array = array( |
193 | 193 | 'archived' => EE_Ticket::archived, |
@@ -197,6 +197,6 @@ discard block |
||
197 | 197 | 'onsale' => EE_Ticket::onsale |
198 | 198 | ); |
199 | 199 | |
200 | - return EEH_Template::status_legend( $status_array, $status ); |
|
200 | + return EEH_Template::status_legend($status_array, $status); |
|
201 | 201 | } |
202 | 202 | } |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <a class='clone-date-time dtm-inp-btn' rel='<?php echo $row; ?>' title='<?php esc_attr_e('Clone this Event Date and Time', 'event_espresso'); ?>' style='position:relative; top:5px; margin:0 0 0 10px; font-size:.9em; cursor:pointer;'> |
2 | - <img src='<?php echo EE_IMAGES_URL;?>clone-trooper-16x16.png' width='16' height='16' alt='<?php esc_attr_e('clone', 'event_espresso'); ?>'/> |
|
2 | + <img src='<?php echo EE_IMAGES_URL; ?>clone-trooper-16x16.png' width='16' height='16' alt='<?php esc_attr_e('clone', 'event_espresso'); ?>'/> |
|
3 | 3 | </a> |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( EE_Registry::instance()->CFG->admin->use_event_timezones ) : ?> |
|
1 | +<?php if (EE_Registry::instance()->CFG->admin->use_event_timezones) : ?> |
|
2 | 2 | <div id="timezones-datetimes-dv" class=""> |
3 | 3 | <span class="run-in"> <?php _e('Current Time for Event Timezone:', 'event_espresso'); ?> </span> |
4 | 4 | <span class="current-date"> <?php echo $current_date; ?></span> |
@@ -6,27 +6,27 @@ |
||
6 | 6 | <?php |
7 | 7 | $settings_array = array( |
8 | 8 | 'max_registrants' => '<p> |
9 | - <label for="max-registrants">' . __('Maximum number of tickets allowed per order for this event: ', 'event_espresso') . '</label> |
|
10 | - <input class="ee-numeric" type="text" id="max-registrants" name="additional_limit" value="' . $additional_limit . '" size="4" /> |
|
9 | + <label for="max-registrants">' . __('Maximum number of tickets allowed per order for this event: ', 'event_espresso').'</label> |
|
10 | + <input class="ee-numeric" type="text" id="max-registrants" name="additional_limit" value="' . $additional_limit.'" size="4" /> |
|
11 | 11 | </p>', |
12 | 12 | 'additional_registration_options' => $additional_registration_options, |
13 | 13 | 'display_ticket_selector' => '<p> |
14 | - <label>' . __('Display Ticket Selector', 'event_espresso') . '</label>' . $display_ticket_selector . '</p>', |
|
14 | + <label>' . __('Display Ticket Selector', 'event_espresso').'</label>'.$display_ticket_selector.'</p>', |
|
15 | 15 | 'alternative_registration_page' => '<p> |
16 | - <label>' . __('Alternative Registration Page', 'event_espresso') . '</label> |
|
17 | - <input name="externalURL" size="20" type="text" value="' . $_event->external_url() . '"> |
|
16 | + <label>' . __('Alternative Registration Page', 'event_espresso').'</label> |
|
17 | + <input name="externalURL" size="20" type="text" value="' . $_event->external_url().'"> |
|
18 | 18 | </p>', |
19 | 19 | 'event_phone_number' => '<p> |
20 | - <label>' . __('Event Phone Number', 'event_espresso') . '</label> |
|
21 | - <input name="event_phone" size="20" type="text" value="' . $_event->phone() . '"> |
|
20 | + <label>' . __('Event Phone Number', 'event_espresso').'</label> |
|
21 | + <input name="event_phone" size="20" type="text" value="' . $_event->phone().'"> |
|
22 | 22 | </p>', |
23 | 23 | 'default_registration_status' => '<p> |
24 | - <label>' . __('Default Registration Status', 'event_espresso') . '</label>' . $EVT_default_registration_status . '</p>' |
|
24 | + <label>' . __('Default Registration Status', 'event_espresso').'</label>'.$EVT_default_registration_status.'</p>' |
|
25 | 25 | ); |
26 | 26 | //filter |
27 | - $settings_array = apply_filters( 'FHEE__caffeinated_event_registration_options__template__settings', $settings_array ); |
|
27 | + $settings_array = apply_filters('FHEE__caffeinated_event_registration_options__template__settings', $settings_array); |
|
28 | 28 | |
29 | 29 | //echo |
30 | - foreach ( $settings_array as $item ) { |
|
30 | + foreach ($settings_array as $item) { |
|
31 | 31 | echo $item; |
32 | 32 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <div class="import-area"> |
2 | 2 | <div class="important-notice"> |
3 | - <?php _e( 'The import feature has been disabled because of bugs. It is expected to be put back in place soon.', 'event_espresso' );?> |
|
3 | + <?php _e('The import feature has been disabled because of bugs. It is expected to be put back in place soon.', 'event_espresso'); ?> |
|
4 | 4 | </div> |
5 | 5 | <?php // echo $form?> |
6 | 6 | </div> |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | <?php echo EEH_Template::get_help_tab_link('full_logging_info'); ?> |
12 | 12 | </th> |
13 | 13 | <td> |
14 | - <?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging ); ?> |
|
14 | + <?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging); ?> |
|
15 | 15 | <p class="description"> |
16 | 16 | <span class="reminder-spn"> |
17 | 17 | <?php _e('Please use caution when using this feature. These files may be publicly available.', 'event_espresso'); ?> |
18 | 18 | </span><br/> |
19 | - <?php echo sprintf( __('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/' . EE_Registry::instance()->CFG->admin->log_file_name() . '</b>' ); ?> |
|
19 | + <?php echo sprintf(__('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/'.EE_Registry::instance()->CFG->admin->log_file_name().'</b>'); ?> |
|
20 | 20 | </p> |
21 | 21 | |
22 | 22 | </td> |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | <?php echo EEH_Template::get_help_tab_link('remote_logging_info'); ?> |
29 | 29 | </th> |
30 | 30 | <td> |
31 | - <?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging ); ?> |
|
31 | + <?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging); ?> |
|
32 | 32 | <p class="description"> |
33 | 33 | <?php _e('Send debugging data to the remote URL below.', 'event_espresso'); ?> |
34 | 34 | </p> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | <?php echo EEH_Template::get_help_tab_link('remote_logging_url_info'); ?> |
42 | 42 | </th> |
43 | 43 | <td> |
44 | - <input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url;?>" /> |
|
44 | + <input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url; ?>" /> |
|
45 | 45 | <p class="description"> |
46 | 46 | <?php _e('Example: http://requestb.in/MY_UNIQUE_ID', 'event_espresso'); ?> |
47 | 47 |
@@ -1,5 +1,5 @@ discard block |
||
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 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | class Custom_Messages_Template_List_Table extends EE_Admin_List_Table { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $admin_page ) { |
|
33 | + public function __construct($admin_page) { |
|
34 | 34 | //Set parent defaults |
35 | 35 | parent::__construct($admin_page); |
36 | 36 | } |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | |
41 | 41 | protected function _setup_data() { |
42 | - $this->_data = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, FALSE, FALSE, FALSE ); |
|
43 | - $this->_all_data_count = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, TRUE, TRUE, FALSE ); |
|
42 | + $this->_data = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, FALSE, FALSE, FALSE); |
|
43 | + $this->_all_data_count = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, TRUE, TRUE, FALSE); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function _set_properties() { |
51 | 51 | $this->_wp_list_args = array( |
52 | - 'singular' => __('Message Template Group', 'event_espresso' ), |
|
53 | - 'plural' => __('Message Template', 'event_espresso' ), |
|
52 | + 'singular' => __('Message Template Group', 'event_espresso'), |
|
53 | + 'plural' => __('Message Template', 'event_espresso'), |
|
54 | 54 | 'ajax' => TRUE, //for now, |
55 | 55 | 'screen' => $this->_admin_page->get_current_screen()->id |
56 | 56 | ); |
@@ -59,15 +59,15 @@ discard block |
||
59 | 59 | 'cb' => '<input type="checkbox" />', |
60 | 60 | 'name' => __('Template Name', 'event_espresso'), |
61 | 61 | 'message_type' => __('Message Type', 'event_espresso'), |
62 | - 'messenger' => __( 'Messenger', 'event_espresso'), |
|
63 | - 'description' => __( 'Description', 'event_espresso' ), |
|
64 | - 'events' => __( 'Events', 'event_espresso'), //count of events using this template. |
|
62 | + 'messenger' => __('Messenger', 'event_espresso'), |
|
63 | + 'description' => __('Description', 'event_espresso'), |
|
64 | + 'events' => __('Events', 'event_espresso'), //count of events using this template. |
|
65 | 65 | 'actions' => '' |
66 | 66 | //'messages_sent' => __( 'Total Sent', 'event_espresso' ) //todo this will come later when we've got message tracking in place. |
67 | 67 | ); |
68 | 68 | |
69 | 69 | $this->_sortable_columns = array( |
70 | - 'messenger' => array( 'MTP_messenger' => TRUE ), |
|
70 | + 'messenger' => array('MTP_messenger' => TRUE), |
|
71 | 71 | //'message_type' => array( 'MTP_message_type' => FALSE ) |
72 | 72 | ); |
73 | 73 | |
@@ -86,16 +86,16 @@ discard block |
||
86 | 86 | * |
87 | 87 | * @return string |
88 | 88 | */ |
89 | - public function single_row( $item ) { |
|
89 | + public function single_row($item) { |
|
90 | 90 | $message_type = $item->message_type_obj(); |
91 | 91 | $messenger = $item->messenger_obj(); |
92 | 92 | |
93 | - if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger ) { |
|
93 | + if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger) { |
|
94 | 94 | echo ''; |
95 | 95 | return; |
96 | 96 | } |
97 | 97 | |
98 | - parent::single_row( $item ); |
|
98 | + parent::single_row($item); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | |
@@ -103,29 +103,29 @@ discard block |
||
103 | 103 | |
104 | 104 | protected function _get_table_filters() { |
105 | 105 | $filters = array(); |
106 | - EE_Registry::instance()->load_helper( 'Form_Fields' ); |
|
106 | + EE_Registry::instance()->load_helper('Form_Fields'); |
|
107 | 107 | $messengers = $this->_admin_page->get_active_messengers(); |
108 | 108 | $message_types = $this->_admin_page->get_installed_message_types(); |
109 | 109 | |
110 | 110 | |
111 | 111 | //setup messengers for selects |
112 | - $i=1; |
|
112 | + $i = 1; |
|
113 | 113 | $m_values[0]['id'] = 'all'; |
114 | - $m_values[0]['text'] = __('All Messengers', 'event_espresso' ); |
|
115 | - foreach ( $messengers as $messenger => $args ) { |
|
114 | + $m_values[0]['text'] = __('All Messengers', 'event_espresso'); |
|
115 | + foreach ($messengers as $messenger => $args) { |
|
116 | 116 | $m_values[$i]['id'] = $messenger; |
117 | 117 | $m_values[$i]['text'] = ucwords($args['obj']->label['singular']); |
118 | 118 | $i++; |
119 | 119 | } |
120 | - foreach ( $messengers as $messenger => $args ) { |
|
120 | + foreach ($messengers as $messenger => $args) { |
|
121 | 121 | $m_values[$i]['id'] = $messenger; |
122 | 122 | $m_values[$i]['text'] = ucwords($args['obj']->label['singular']); |
123 | 123 | $i++; |
124 | 124 | } |
125 | 125 | |
126 | 126 | //lets do the same for message types |
127 | - $i=1; |
|
128 | - foreach ( $message_types as $message_type => $args ) { |
|
127 | + $i = 1; |
|
128 | + foreach ($message_types as $message_type => $args) { |
|
129 | 129 | $mt_values[$i]['id'] = $message_type; |
130 | 130 | $mt_values[$i]['text'] = ucwords($args['obj']->label['singular']); |
131 | 131 | $i++; |
@@ -141,28 +141,28 @@ discard block |
||
141 | 141 | 'text' => __('Show All', 'event_espresso') |
142 | 142 | ); |
143 | 143 | |
144 | - $msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array(); |
|
145 | - $mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array(); |
|
144 | + $msgr_filters = ! empty($m_values) ? array_merge($msgr_default, $m_values) : array(); |
|
145 | + $mt_filters = ! empty($mt_values) ? array_merge($mt_default, $mt_values) : array(); |
|
146 | 146 | |
147 | - if ( empty( $m_values ) ) |
|
147 | + if (empty($m_values)) |
|
148 | 148 | $msgr_filters[0] = array( |
149 | 149 | 'id' => 'no_messenger_options', |
150 | 150 | 'text' => __('No Messengers active', 'event_espresso') |
151 | 151 | ); |
152 | 152 | |
153 | - if ( empty($mt_values) ) |
|
153 | + if (empty($mt_values)) |
|
154 | 154 | $mt_filters[0] = array( |
155 | 155 | 'id' => 'no_message_type_options', |
156 | 156 | 'text' => __('No Message Types active', 'event_espresso') |
157 | 157 | ); |
158 | 158 | |
159 | - if ( count( $messengers ) >= 1 && !empty( $m_values ) ) { |
|
160 | - unset( $msgr_filters[0] ); |
|
161 | - $msgr_filters = array_values( $msgr_filters ); //reindex keys |
|
159 | + if (count($messengers) >= 1 && ! empty($m_values)) { |
|
160 | + unset($msgr_filters[0]); |
|
161 | + $msgr_filters = array_values($msgr_filters); //reindex keys |
|
162 | 162 | } |
163 | 163 | |
164 | - $filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key( $this->_req_data['ee_messenger_filter_by']) : '' ); |
|
165 | - $filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key( $this->_req_data['ee_message_type_filter_by']) : ''); |
|
164 | + $filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key($this->_req_data['ee_messenger_filter_by']) : ''); |
|
165 | + $filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key($this->_req_data['ee_message_type_filter_by']) : ''); |
|
166 | 166 | return $filters; |
167 | 167 | } |
168 | 168 | |
@@ -170,14 +170,14 @@ discard block |
||
170 | 170 | * we're just removing the search box for message templates, not needed. |
171 | 171 | * @return string (empty); |
172 | 172 | */ |
173 | - function search_box( $text, $input_id ) { |
|
173 | + function search_box($text, $input_id) { |
|
174 | 174 | return ''; |
175 | 175 | } |
176 | 176 | |
177 | 177 | |
178 | 178 | protected function _add_view_counts() { |
179 | - foreach ( $this->_views as $view => $args ) { |
|
180 | - $this->_views[$view]['count'] = $this->_admin_page->get_message_templates( $this->_per_page, $view, TRUE, TRUE, FALSE ); |
|
179 | + foreach ($this->_views as $view => $args) { |
|
180 | + $this->_views[$view]['count'] = $this->_admin_page->get_message_templates($this->_per_page, $view, TRUE, TRUE, FALSE); |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | |
@@ -191,16 +191,16 @@ discard block |
||
191 | 191 | * @return string |
192 | 192 | */ |
193 | 193 | public function no_items() { |
194 | - if ( $this->_view !== 'trashed' ) |
|
195 | - printf( __('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>' ); |
|
194 | + if ($this->_view !== 'trashed') |
|
195 | + printf(__('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>'); |
|
196 | 196 | else |
197 | 197 | parent::no_items(); |
198 | 198 | } |
199 | 199 | |
200 | 200 | |
201 | 201 | |
202 | - public function column_cb( $item ) { |
|
203 | - return sprintf( '<input type="checkbox" name="checkbox[%s] value="1" />', $item->GRP_ID() ); |
|
202 | + public function column_cb($item) { |
|
203 | + return sprintf('<input type="checkbox" name="checkbox[%s] value="1" />', $item->GRP_ID()); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | |
@@ -208,29 +208,29 @@ discard block |
||
208 | 208 | |
209 | 209 | |
210 | 210 | |
211 | - function column_name( $item ) { |
|
212 | - return '<p>' . $item->name() . '</p>'; |
|
211 | + function column_name($item) { |
|
212 | + return '<p>'.$item->name().'</p>'; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | |
216 | 216 | |
217 | 217 | |
218 | - function column_description( $item ) { |
|
219 | - return '<p>' . $item->description() . '</p>'; |
|
218 | + function column_description($item) { |
|
219 | + return '<p>'.$item->description().'</p>'; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | |
223 | 223 | |
224 | - function column_actions( $item ) { |
|
225 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'espresso_messages_add_new_message_template' ) ) { |
|
224 | + function column_actions($item) { |
|
225 | + if (EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'espresso_messages_add_new_message_template')) { |
|
226 | 226 | $create_args = array( |
227 | 227 | 'GRP_ID' => $item->ID(), |
228 | 228 | 'messenger' => $item->messenger(), |
229 | 229 | 'message_type' => $item->message_type(), |
230 | 230 | 'action' => 'add_new_message_template' |
231 | 231 | ); |
232 | - $create_link = EE_Admin_Page::add_query_args_and_nonce( $create_args, EE_MSG_ADMIN_URL ); |
|
233 | - return sprintf( '<p><a href="%s" class="button button-small">%s</a></p>', $create_link, __('Create Custom', 'event_espresso') ); |
|
232 | + $create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL); |
|
233 | + return sprintf('<p><a href="%s" class="button button-small">%s</a></p>', $create_link, __('Create Custom', 'event_espresso')); |
|
234 | 234 | } |
235 | 235 | return ''; |
236 | 236 | } |
@@ -247,27 +247,27 @@ discard block |
||
247 | 247 | $actions = array(); |
248 | 248 | |
249 | 249 | // edit link but only if item isn't trashed. |
250 | - if ( !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ) { |
|
251 | - $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_message_template', 'id'=>$item->GRP_ID() ), EE_MSG_ADMIN_URL ); |
|
252 | - $actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>'; |
|
250 | + if ( ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID())) { |
|
251 | + $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID()), EE_MSG_ADMIN_URL); |
|
252 | + $actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'; |
|
253 | 253 | } |
254 | 254 | |
255 | - $name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() )? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template', 'event_espresso' ) . '">' . ucwords( $item->messenger_obj()->label['singular'] ) . '</a>' : ucwords( $item->messenger_obj()->label['singular'] ); |
|
256 | - $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE ), EE_MSG_ADMIN_URL ); |
|
255 | + $name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template', 'event_espresso').'">'.ucwords($item->messenger_obj()->label['singular']).'</a>' : ucwords($item->messenger_obj()->label['singular']); |
|
256 | + $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE), EE_MSG_ADMIN_URL); |
|
257 | 257 | // restore link |
258 | - $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE ), EE_MSG_ADMIN_URL ); |
|
258 | + $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE), EE_MSG_ADMIN_URL); |
|
259 | 259 | // delete price link |
260 | - $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE ), EE_MSG_ADMIN_URL ); |
|
260 | + $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_message_template', 'id'=>$item->GRP_ID(), 'noheader' => TRUE), EE_MSG_ADMIN_URL); |
|
261 | 261 | |
262 | - if ( !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_message', 'espresso_messages_trash_message_template', $item->ID() ) ) { |
|
263 | - $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Template Group to Trash', 'event_espresso' ) . '">' . __( 'Move to Trash', 'event_espresso' ) . '</a>'; |
|
262 | + if ( ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_delete_message', 'espresso_messages_trash_message_template', $item->ID())) { |
|
263 | + $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Template Group to Trash', 'event_espresso').'">'.__('Move to Trash', 'event_espresso').'</a>'; |
|
264 | 264 | } else { |
265 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_message', 'espresso_messages_restore_message_template', $item->ID() ) ) { |
|
266 | - $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Message Template', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>'; |
|
265 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_message', 'espresso_messages_restore_message_template', $item->ID())) { |
|
266 | + $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Message Template', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>'; |
|
267 | 267 | } |
268 | 268 | |
269 | - if ( $this->_view == 'trashed' && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_message', 'espresso_messages_delete_message_template', $item->ID() ) ) { |
|
270 | - $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Template Group Permanently', 'event_espresso' ) . '">' . __( 'Delete Permanently', 'event_espresso' ) . '</a>'; |
|
269 | + if ($this->_view == 'trashed' && EE_Registry::instance()->CAP->current_user_can('ee_delete_message', 'espresso_messages_delete_message_template', $item->ID())) { |
|
270 | + $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Template Group Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>'; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | |
@@ -276,15 +276,15 @@ discard block |
||
276 | 276 | $c_configs = $item->contexts_config(); |
277 | 277 | $ctxt = array(); |
278 | 278 | $context_templates = $item->context_templates(); |
279 | - foreach ( $context_templates as $context => $template_fields ) { |
|
280 | - $mtp_to = !empty( $context_templates[$context]['to'] ) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL; |
|
281 | - $inactive = empty( $mtp_to ) && !empty( $context_templates[$context]['to'] ) ? ' class="mtp-inactive"' : ''; |
|
279 | + foreach ($context_templates as $context => $template_fields) { |
|
280 | + $mtp_to = ! empty($context_templates[$context]['to']) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL; |
|
281 | + $inactive = empty($mtp_to) && ! empty($context_templates[$context]['to']) ? ' class="mtp-inactive"' : ''; |
|
282 | 282 | $context_title = ucwords($c_configs[$context]['label']); |
283 | - $edit_link = EE_Admin_Page::add_query_args_and_nonce( array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL ); |
|
284 | - $ctxt[] = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? '<a' . $inactive . ' href="'. $edit_link . '" title="' . esc_attr__('Edit Context', 'event_espresso') . '">' . $context_title . '</a>' : $context_title; |
|
283 | + $edit_link = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL); |
|
284 | + $ctxt[] = EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a'.$inactive.' href="'.$edit_link.'" title="'.esc_attr__('Edit Context', 'event_espresso').'">'.$context_title.'</a>' : $context_title; |
|
285 | 285 | } |
286 | 286 | |
287 | - $ctx_content = !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? sprintf( __('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural']) ) . implode(' | ', $ctxt) : ''; |
|
287 | + $ctx_content = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? sprintf(__('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural'])).implode(' | ', $ctxt) : ''; |
|
288 | 288 | |
289 | 289 | |
290 | 290 | //Return the name contents |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | /* $1%s */ $name_link, |
293 | 293 | /* $2%s */ $item->GRP_ID(), |
294 | 294 | /* %4$s */ $ctx_content, |
295 | - /* $3%s */ $this->row_actions( $actions ) |
|
295 | + /* $3%s */ $this->row_actions($actions) |
|
296 | 296 | ); |
297 | 297 | } |
298 | 298 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | * @return string message_type name |
314 | 314 | */ |
315 | 315 | function column_message_type($item) { |
316 | - return ucwords($item->message_type_obj()->label['singular'] ); |
|
316 | + return ucwords($item->message_type_obj()->label['singular']); |
|
317 | 317 | } |
318 | 318 | |
319 | 319 |
@@ -1,6 +1,7 @@ discard block |
||
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 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -144,17 +145,19 @@ discard block |
||
144 | 145 | $msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array(); |
145 | 146 | $mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array(); |
146 | 147 | |
147 | - if ( empty( $m_values ) ) |
|
148 | - $msgr_filters[0] = array( |
|
148 | + if ( empty( $m_values ) ) { |
|
149 | + $msgr_filters[0] = array( |
|
149 | 150 | 'id' => 'no_messenger_options', |
150 | 151 | 'text' => __('No Messengers active', 'event_espresso') |
151 | 152 | ); |
153 | + } |
|
152 | 154 | |
153 | - if ( empty($mt_values) ) |
|
154 | - $mt_filters[0] = array( |
|
155 | + if ( empty($mt_values) ) { |
|
156 | + $mt_filters[0] = array( |
|
155 | 157 | 'id' => 'no_message_type_options', |
156 | 158 | 'text' => __('No Message Types active', 'event_espresso') |
157 | 159 | ); |
160 | + } |
|
158 | 161 | |
159 | 162 | if ( count( $messengers ) >= 1 && !empty( $m_values ) ) { |
160 | 163 | unset( $msgr_filters[0] ); |
@@ -191,10 +194,11 @@ discard block |
||
191 | 194 | * @return string |
192 | 195 | */ |
193 | 196 | public function no_items() { |
194 | - if ( $this->_view !== 'trashed' ) |
|
195 | - printf( __('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>' ); |
|
196 | - else |
|
197 | - parent::no_items(); |
|
197 | + if ( $this->_view !== 'trashed' ) { |
|
198 | + printf( __('%sNo Custom Templates found.%s To create your first custom message template, go to the "Default Message Templates" tab and click the "Create Custom" button next to the template you want to use as a base for the new one.', 'event_espresso'), '<strong>', '</strong>' ); |
|
199 | + } else { |
|
200 | + parent::no_items(); |
|
201 | + } |
|
198 | 202 | } |
199 | 203 | |
200 | 204 |
@@ -1,5 +1,5 @@ discard block |
||
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 | /** |
@@ -31,18 +31,18 @@ discard block |
||
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | - public function __construct( $routing = TRUE ) { |
|
35 | - parent::__construct( $routing ); |
|
36 | - if ( !defined( 'EE_MSG_CAF_ASSETS_PATH' ) ) { |
|
37 | - define( 'EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/' ); |
|
38 | - define( 'EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/' ); |
|
39 | - define( 'EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/' ); |
|
40 | - define( 'EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/' ); |
|
34 | + public function __construct($routing = TRUE) { |
|
35 | + parent::__construct($routing); |
|
36 | + if ( ! defined('EE_MSG_CAF_ASSETS_PATH')) { |
|
37 | + define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/assets/'); |
|
38 | + define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/assets/'); |
|
39 | + define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/templates/'); |
|
40 | + define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/templates/'); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | 44 | protected function _extend_page_config() { |
45 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages'; |
|
45 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'messages'; |
|
46 | 46 | $this->_page_routes['custom_mtps'] = array( |
47 | 47 | 'func' => '_ee_custom_messages_overview_list_table', |
48 | 48 | 'capability' => 'ee_read_messages' ); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'require_nonce' => FALSE |
71 | 71 | ); |
72 | 72 | |
73 | - add_action( 'current_screen', array( $this, 'dynamic_screen_hooks' ), 10 ); |
|
73 | + add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | public function dynamic_screen_hooks() { |
88 | 88 | global $admin_page_hooks; |
89 | 89 | |
90 | - if ( !empty( $admin_page_hooks['espresso_events'] ) ) { |
|
90 | + if ( ! empty($admin_page_hooks['espresso_events'])) { |
|
91 | 91 | //we're on a EE specific page... good stuff! |
92 | 92 | $hook_prefix = $admin_page_hooks['espresso_events']; |
93 | - $filter_ref = $hook_prefix . '_page_' . $this->page_slug; |
|
94 | - add_filter( 'FHEE_manage_' . $filter_ref . '_columns', array( $this, 'add_custom_mtps_columns' ), 10, 2 ); |
|
95 | - add_action( 'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref, array( $this, 'custom_mtp_create_button_column'), 10, 2 ); |
|
93 | + $filter_ref = $hook_prefix.'_page_'.$this->page_slug; |
|
94 | + add_filter('FHEE_manage_'.$filter_ref.'_columns', array($this, 'add_custom_mtps_columns'), 10, 2); |
|
95 | + add_action('AHEE__EE_Admin_List_Table__column_actions__'.$filter_ref, array($this, 'custom_mtp_create_button_column'), 10, 2); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | * @param array $columns Original defined list of columns |
107 | 107 | * @param string $screen_id The unique screen id for the page. |
108 | 108 | */ |
109 | - public function add_custom_mtps_columns( $columns, $screen_id ) { |
|
110 | - if ( $screen_id !== 'espresso_messages_default' ) { |
|
109 | + public function add_custom_mtps_columns($columns, $screen_id) { |
|
110 | + if ($screen_id !== 'espresso_messages_default') { |
|
111 | 111 | return $columns; |
112 | 112 | } |
113 | 113 | |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @return string html content for the page. |
130 | 130 | */ |
131 | - public function custom_mtp_create_button_column( $item, $screen_id ) { |
|
132 | - if ( $screen_id !== 'espresso_messages_default' || ! EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'espresso_messages_add_new_message_template' ) ) { |
|
131 | + public function custom_mtp_create_button_column($item, $screen_id) { |
|
132 | + if ($screen_id !== 'espresso_messages_default' || ! EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'espresso_messages_add_new_message_template')) { |
|
133 | 133 | return ''; |
134 | 134 | } |
135 | 135 | |
136 | 136 | //first we consider whether this template has override set. If it does then that means no custom templates can be created from this template as a base. So let's just skip the button creation. |
137 | - if ( $item->get('MTP_is_override' ) ) |
|
137 | + if ($item->get('MTP_is_override')) |
|
138 | 138 | return ''; |
139 | 139 | |
140 | 140 | |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | 'message_type' => $item->message_type(), |
145 | 145 | 'action' => 'add_new_message_template' |
146 | 146 | ); |
147 | - $create_link = EE_Admin_Page::add_query_args_and_nonce( $create_args, EE_MSG_ADMIN_URL ); |
|
148 | - echo sprintf( '<a href="%s" class="button button-small">%s</a>', $create_link, __('Create Custom', 'event_espresso') ); |
|
147 | + $create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL); |
|
148 | + echo sprintf('<a href="%s" class="button button-small">%s</a>', $create_link, __('Create Custom', 'event_espresso')); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | ) |
179 | 179 | ) |
180 | 180 | ); |
181 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_messages', 'espresso_messages_trash_message_template' ) ) { |
|
181 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_messages', 'espresso_messages_trash_message_template')) { |
|
182 | 182 | $this->_views['trashed'] = array( |
183 | 183 | 'slug' => 'trashed', |
184 | 184 | 'label' => __('Trash', 'event_espresso'), |
@@ -1,6 +1,7 @@ discard block |
||
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 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -134,8 +135,9 @@ discard block |
||
134 | 135 | } |
135 | 136 | |
136 | 137 | //first we consider whether this template has override set. If it does then that means no custom templates can be created from this template as a base. So let's just skip the button creation. |
137 | - if ( $item->get('MTP_is_override' ) ) |
|
138 | - return ''; |
|
138 | + if ( $item->get('MTP_is_override' ) ) { |
|
139 | + return ''; |
|
140 | + } |
|
139 | 141 | |
140 | 142 | |
141 | 143 | $create_args = array( |