Skip to content

Commit

Permalink
some escaping of translations
Browse files Browse the repository at this point in the history
  • Loading branch information
liedekef committed Jan 22, 2023
1 parent e7e07b3 commit 0f2a07e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion eme-attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function eme_attributes_form( $eme_array ) {
<select name="eme_attr_<?php echo $count; ?>_ref">
<?php
if ( ! in_array( $name, $attributes ) ) {
echo "<option value='".esc_attr($name)."'>".esc_html($name)." (" . __( 'Not defined in templates', 'events-made-easy' ) . ')</option>';
echo "<option value='".esc_attr($name)."'>".esc_html($name)." (" . esc_html__( 'Not defined in templates', 'events-made-easy' ) . ')</option>';
}
foreach ( $attributes as $attribute ) {
if ( $attribute == $name ) {
Expand Down
12 changes: 6 additions & 6 deletions eme-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ function eme_categories_edit_layout( $message = '' ) {
<tr class='form-field'>
<th scope='row' style='vertical-align:top'><label for='description'><?php esc_html_e( 'Category description', 'events-made-easy' ); ?></label></th>
<td><div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
<!-- we need content for qtranslate as ID -->
<?php
$eme_editor_settings = eme_get_editor_settings();
wp_editor( $category['description'], 'description', $eme_editor_settings );
?>
<br><?php esc_html_e( 'The description of the category', 'events-made-easy' ); ?>
<!-- we need description for qtranslate as ID -->
<?php
$eme_editor_settings = eme_get_editor_settings();
wp_editor( $category['description'], 'description', $eme_editor_settings );
?>
<br><?php esc_html_e( 'The description of the category', 'events-made-easy' ); ?>
</div>
</td>
</tr>
Expand Down
36 changes: 18 additions & 18 deletions eme-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -5804,7 +5804,7 @@ function eme_events_table( $message = '' ) {
<?php
$formfields_searchable = eme_get_searchable_formfields( 'events' );
if ( ! empty( $formfields_searchable ) ) {
echo '<input type="text" class="clearable" name="search_customfields" id="search_customfields" placeholder="' . __( 'Custom field value to search', 'events-made-easy' ) . '" size=20>';
echo '<input type="text" class="clearable" name="search_customfields" id="search_customfields" placeholder="' . esc_attr__( 'Custom field value to search', 'events-made-easy' ) . '" size=20>';
echo eme_ui_multiselect_key_value( '', 'search_customfieldids', $formfields_searchable, 'field_id', 'field_name', 5, '', 0, 'eme_select2_customfieldids_class' );
}
?>
Expand Down Expand Up @@ -6266,19 +6266,19 @@ function eme_event_form( $event, $info, $edit_recurrence = 0 ) {
<div id="tasks-mailtemplates-accordion">
<?php
$templates_array = eme_get_templates_array_by_id( 'task' );
echo '<h3>' . __( 'Task Signup Made Email', 'events-made-easy' ) . '</h3>';
echo '<h3>' . esc_html__( 'Task Signup Made Email', 'events-made-easy' ) . '</h3>';
echo '<div>';
eme_meta_box_div_event_task_signup_made_email( $event, $templates_array );
echo '</div>';
echo '<h3>' . __( 'Task Signup Reminder Email', 'events-made-easy' ) . '</h3>';
echo '<h3>' . esc_html__( 'Task Signup Reminder Email', 'events-made-easy' ) . '</h3>';
echo '<div>';
eme_meta_box_div_event_task_signup_reminder_email( $event, $templates_array );
echo '</div>';
echo '<h3>' . __( 'Task Signup Cancelled Email', 'events-made-easy' ) . '</h3>';
echo '<h3>' . esc_html__( 'Task Signup Cancelled Email', 'events-made-easy' ) . '</h3>';
echo '<div>';
eme_meta_box_div_event_task_signup_cancelled_email( $event, $templates_array );
echo '</div>';
echo '<h3>' . __( 'Task Signup Deleted Email', 'events-made-easy' ) . '</h3>';
echo '<h3>' . esc_html__( 'Task Signup Deleted Email', 'events-made-easy' ) . '</h3>';
echo '<div>';
eme_meta_box_div_event_task_signup_trashed_email( $event, $templates_array );
echo '</div>';
Expand Down Expand Up @@ -6800,9 +6800,9 @@ function eme_meta_box_div_event_name( $event, $edit_recurrence = 0 ) {
<br>
<?php
if ( ! empty( $event['event_id'] ) && ! empty( $event['event_name'] ) != '' ) {
echo '<b>' . __( 'Permalink: ', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Permalink: ', 'events-made-easy' ) . '</b>';
} else {
echo '<b>' . __( 'Permalink prefix: ', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Permalink prefix: ', 'events-made-easy' ) . '</b>';
}
echo trailingslashit( home_url() );
$events_prefixes = get_option( 'eme_permalink_events_prefix', 'events' );
Expand Down Expand Up @@ -6883,7 +6883,7 @@ function eme_meta_box_div_event_datetime( $event, $recurrence, $edit_recurrence
</div>
<div id="time-selector">
<?php
echo '<b>' . __( 'Event time', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Event time', 'events-made-easy' ) . '</b>';
?>
<input id="localized_start_time" type="text" size="8" name="localized_start_time" value="<?php if ( ! eme_is_empty_datetime( $event['event_start'] ) ) { echo $start_date_obj->format( EME_WP_TIME_FORMAT );} ?>" class='eme_formfield_timepicker' >
-
Expand Down Expand Up @@ -7059,7 +7059,7 @@ function eme_meta_box_div_event_single_event_format( $event, $templates_array )
<div id="div_event_single_event_format">
<br>
<?php
echo '<b>' . __( 'Single Event', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Single Event', 'events-made-easy' ) . '</b>';
?>
<p class="eme_smaller">
<?php esc_html_e( 'The format of the single event page.', 'events-made-easy' ); ?>
Expand Down Expand Up @@ -7121,7 +7121,7 @@ function eme_meta_box_div_event_contactperson_ipn_email( $event, $templates_arra
} else {
$showhide_style = 'style="width:100%;"';
}
echo '<b>' . __( 'Contact Person Payment Gateway Notification Email Body', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Contact Person Payment Gateway Notification Email Body', 'events-made-easy' ) . '</b>';
?>
<p class="eme_smaller"><?php esc_html_e( 'The body of the email which will be sent to the contact person when a payment notification is received via a payment gateway.', 'events-made-easy' ); ?>
<br>
Expand Down Expand Up @@ -7167,7 +7167,7 @@ function eme_meta_box_div_event_registration_recorded_ok_html( $event, $template
<div id="div_event_registration_recorded_ok_html">
<br>
<?php
echo '<b>' . __( 'Booking recorded message', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Booking recorded message', 'events-made-easy' ) . '</b>';
?>
<p class="eme_smaller"><?php esc_html_e( 'The text (html allowed) shown to the user when the booking has been made successfully.', 'events-made-easy' ); ?>
<br>
Expand Down Expand Up @@ -7358,7 +7358,7 @@ function eme_meta_box_div_event_registration_userpending_email( $event, $templat
} else {
$showhide_style = 'style="width:100%;"';
}
echo '<b>' . __( 'Booking Awaiting User Confirmation Email Body', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Booking Awaiting User Confirmation Email Body', 'events-made-easy' ) . '</b>';
?>
<p class="eme_smaller"><?php esc_html_e( 'The body of the email which will be sent to the respondent if the booking requires user confirmation.', 'events-made-easy' ); ?>
<br>
Expand Down Expand Up @@ -7416,7 +7416,7 @@ function eme_meta_box_div_event_registration_pending_email( $event, $templates_a
} else {
$showhide_style = 'style="width:100%;"';
}
echo '<b>' . __( 'Booking Pending Email Body', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Booking Pending Email Body', 'events-made-easy' ) . '</b>';
?>
<p class="eme_smaller"><?php esc_html_e( 'The body of the email which will be sent to the respondent if the booking requires approval.', 'events-made-easy' ); ?>
<br>
Expand Down Expand Up @@ -7841,7 +7841,7 @@ function eme_meta_box_div_event_registration_paid_email( $event, $templates_arra
} else {
$showhide_style = 'style="width:100%;"';
}
echo '<b>' . __( 'Contact Person Booking Paid Email Body', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Contact Person Booking Paid Email Body', 'events-made-easy' ) . '</b>';
?>
<p class="eme_smaller"><?php esc_html_e( 'The body of the email which will be sent to the contact person when a booking is marked as paid (not via a payment gateway).', 'events-made-easy' ); ?>
<br>
Expand Down Expand Up @@ -8130,7 +8130,7 @@ function eme_meta_box_div_event_notes( $event ) {
<div id="div_event_notes">
<br>
<?php
echo '<b>' . __( 'Event description', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Event description', 'events-made-easy' ) . '</b>';
?>
<p class="eme_smaller"><?php esc_html_e( 'The event description. This is also used in html meta tags and google tags to show the event info.', 'events-made-easy' ); ?></p>
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
Expand Down Expand Up @@ -8159,10 +8159,10 @@ function eme_meta_box_div_event_image( $event ) {
</h3>
<?php
if ( ! empty( $event['event_image_url'] ) ) {
echo "<img id='eme_event_image_example' alt='" . __( 'Event image', 'events-made-easy' ) . "' src='" . $event['event_image_url'] . "' width='200'>";
echo "<img id='eme_event_image_example' alt='" . esc_attr__( 'Event image', 'events-made-easy' ) . "' src='" . $event['event_image_url'] . "' width='200'>";
echo "<input type='hidden' name='event_image_url' id='event_image_url' value='" . $event['event_image_url'] . "'>";
} else {
echo "<img id='eme_event_image_example' src='' alt='" . __( 'Event image', 'events-made-easy' ) . "' width='200'>";
echo "<img id='eme_event_image_example' src='' alt='" . esc_attr__( 'Event image', 'events-made-easy' ) . "' width='200'>";
echo "<input type='hidden' name='event_image_url' id='event_image_url'>";
}
if ( ! empty( $event['event_image_id'] ) ) {
Expand All @@ -8184,7 +8184,7 @@ function eme_meta_box_div_event_attributes( $event ) {
<div id="div_event_attributes">
<br>
<?php
echo '<b>' . __( 'Attributes', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Attributes', 'events-made-easy' ) . '</b>';
?>
<?php
eme_attributes_form( $event );
Expand Down
2 changes: 1 addition & 1 deletion eme-formfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -4706,7 +4706,7 @@ function eme_dyndata_adminform( $eme_data, $templates_array, $used_groupingids )
?>
<tr id="eme_dyndata_<?php echo $count; ?>" >
<td>
<?php echo "<img class='eme-sortable-handle' src='" . esc_url(EME_PLUGIN_URL) . "images/reorder.png' alt='" . __( 'Reorder', 'events-made-easy' ) . "'>"; ?>
<?php echo "<img class='eme-sortable-handle' src='" . esc_url(EME_PLUGIN_URL) . "images/reorder.png' alt='" . esc_attr__( 'Reorder', 'events-made-easy' ) . "'>"; ?>
</td>
<td>
<?php echo $info['grouping']; ?>
Expand Down
12 changes: 6 additions & 6 deletions eme-locations.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ function eme_meta_box_div_location_name( $location ) {
<br>
<?php
if ( $action == 'edit' ) {
echo '<b>' . __( 'Permalink: ', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Permalink: ', 'events-made-easy' ) . '</b>';
} else {
echo '<b>' . __( 'Permalink prefix: ', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Permalink prefix: ', 'events-made-easy' ) . '</b>';
}
echo trailingslashit( home_url() );
$locations_prefixes = get_option( 'eme_permalink_locations_prefix', 'locations' );
Expand Down Expand Up @@ -679,10 +679,10 @@ function eme_meta_box_div_location_image( $location ) {
<div id="location_current_image_inside" class="inside">
<?php
if ( ! empty( $location['location_image_url'] ) ) {
echo "<img id='eme_location_image_example' alt='" . __( 'Location image', 'events-made-easy' ) . "' src='" . $location['location_image_url'] . "' width='200'>";
echo "<img id='eme_location_image_example' alt='" . esc_attr__( 'Location image', 'events-made-easy' ) . "' src='" . $location['location_image_url'] . "' width='200'>";
echo "<input type='hidden' name='location_image_url' id='location_image_url' value='" . $location['location_image_url'] . "'>";
} else {
echo "<img id='eme_location_image_example' alt='" . __( 'Location image', 'events-made-easy' ) . "' src='' width='200'>";
echo "<img id='eme_location_image_example' alt='" . esc_attr__( 'Location image', 'events-made-easy' ) . "' src='' width='200'>";
echo "<input type='hidden' name='location_image_url' id='location_image_url'>";
}
if ( ! empty( $location['location_image_id'] ) ) {
Expand Down Expand Up @@ -732,7 +732,7 @@ function eme_meta_box_div_location_attributes( $location ) {
<div id="div_location_attributes">
<br>
<?php
echo '<b>' . __( 'Attributes', 'events-made-easy' ) . '</b>';
echo '<b>' . esc_html__( 'Attributes', 'events-made-easy' ) . '</b>';
?>
<?php
eme_attributes_form( $location );
Expand Down Expand Up @@ -855,7 +855,7 @@ function eme_locations_table( $message = '' ) {
<?php
$formfields_searchable = eme_get_searchable_formfields( 'locations' );
if ( ! empty( $formfields_searchable ) ) {
echo '<input type="text" class="clearable" name="search_customfields" id="search_customfields" placeholder="' . __( 'Custom field value to search', 'events-made-easy' ) . '" size=20>';
echo '<input type="text" class="clearable" name="search_customfields" id="search_customfields" placeholder="' . esc_attr__( 'Custom field value to search', 'events-made-easy' ) . '" size=20>';
echo eme_ui_multiselect_key_value( '', 'search_customfieldids', $formfields_searchable, 'field_id', 'field_name', 5, '', 0, 'eme_select2_customfieldids_class' );
}
?>
Expand Down
2 changes: 1 addition & 1 deletion eme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ function eme_options_page() {
<div>
<table class='form-table'>
<?php
echo "<tr><td colspan='2' class='notice notice-warning'>" . __( 'Remark: due to the incomplete PHP implementation by Paypal, it is not recommended to use this method. It works fine, but has some shortcomings: no webhook functionality (meaning: if someone closes the browser immediately after payment, the payment will not get marked as paid in EME) and refunding is not possible.', 'events-made-easy' ) . '</td></tr>';
echo "<tr><td colspan='2' class='notice notice-warning'>" . esc_html__( 'Remark: due to the incomplete PHP implementation by Paypal, it is not recommended to use this method. It works fine, but has some shortcomings: no webhook functionality (meaning: if someone closes the browser immediately after payment, the payment will not get marked as paid in EME) and refunding is not possible.', 'events-made-easy' ) . '</td></tr>';
eme_options_select(
__( 'PayPal live or test', 'events-made-easy' ),
'eme_paypal_url',
Expand Down

0 comments on commit 0f2a07e

Please sign in to comment.