Skip to content

Commit

Permalink
release 2.4.11
Browse files Browse the repository at this point in the history
  • Loading branch information
liedekef committed Oct 12, 2023
1 parent 89eaf1a commit eb51c64
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 30 deletions.
8 changes: 4 additions & 4 deletions eme-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -8644,12 +8644,12 @@ function eme_meta_box_div_event_rsvp( $event ) {
</td>
</tr>
<tr id='row_require_eme_group'>
<td><label for='eme_prop_required_group_ids'><?php esc_html_e( 'Require EME groups', 'events-made-easy' ); ?></label></td>
<td><label for='eme_prop_rsvp_required_group_ids'><?php esc_html_e( 'Require EME groups', 'events-made-easy' ); ?></label></td>
<td><?php echo eme_ui_multiselect_key_value( $event['event_properties']['rsvp_required_group_ids'], 'eme_prop_rsvp_required_group_ids', eme_get_static_groups(), 'group_id', 'name', 5, '', 0, 'eme_select2_groups_class' ); ?><p class='eme_smaller'><?php esc_html_e( 'Require logged-in user to be in of one of the selected EME groups in order to be able to book for this event.', 'events-made-easy' ); ?></p>
</td>
</tr>
<tr id='row_require_eme_memberships'>
<td><label for='eme_prop_required_membership_ids'><?php esc_html_e( 'Require EME membership', 'events-made-easy' ); ?></label></td>
<td><label for='eme_prop_rsvp_required_membership_ids'><?php esc_html_e( 'Require EME membership', 'events-made-easy' ); ?></label></td>
<td>
<?php echo eme_ui_multiselect_key_value( $event['event_properties']['rsvp_required_membership_ids'], 'eme_prop_rsvp_required_membership_ids', eme_get_memberships(), 'membership_id', 'name', 5, '', 0, 'eme_select2_memberships_class' ); ?><p class='eme_smaller'><?php esc_html_e( 'Require logged-in user to be a member of one of the selected EME memberships in order to be able to book for this event.', 'events-made-easy' ); ?></p>
</td>
Expand Down Expand Up @@ -9215,8 +9215,9 @@ function eme_db_update_event( $line, $event_id, $event_is_part_of_recurrence = 0
$wpdb->show_errors( false );
return false;
} else {
$updated_event['event_id'] = $event_id;
wp_cache_delete( "eme_event $event_id" );
// manage waitinglist
$updated_event = eme_get_event($event_id);
eme_manage_waitinglist($updated_event);
$task_ids = eme_handle_tasks_post_adminform( $event_id, $day_difference );
if ( ! empty( $task_ids ) ) {
Expand All @@ -9225,7 +9226,6 @@ function eme_db_update_event( $line, $event_id, $event_is_part_of_recurrence = 0
eme_delete_event_tasks( $event_id );
}
$wpdb->show_errors( false );
wp_cache_delete( "eme_event $event_id" );
return true;
}
}
Expand Down
53 changes: 30 additions & 23 deletions eme-ui-helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function eme_checkbox_items( $name, $arr, $saved_values, $horizontal = true ) {
if ( in_array( $key, $saved_values ) ) {
$checked = "checked='checked'";
}
$output .= "<input type='checkbox' name='$name' value='" . eme_esc_html( $key ) . "' $checked>&nbsp;<label for='$name'>" . eme_esc_html( $item ) . '</label>';
$id = esc_attr( eme_get_field_id( $name, $key ));
$output .= "<input type='checkbox' name='$name' id='$id' value='" . eme_esc_html( $key ) . "' $checked>&nbsp;<label for='$id'>" . eme_esc_html( $item ) . '</label>';
if ( $horizontal ) {
$output .= "&nbsp;";
} else {
Expand Down Expand Up @@ -164,17 +165,17 @@ function eme_options_select( $title, $name, $list, $description, $option_value =
$option_value = get_option( $name );
}
?>
<tr style='vertical-align:top' id='<?php echo $name; ?>_row'>
<th scope="row"><label for='<?php echo $name; ?>'><?php echo esc_html( $title ); ?></label></th>
<td>
<?php
echo eme_ui_select( $option_value, $name, $list );
if ( ! empty( $description ) ) {
echo '<br>' . $description;
}
?>
</td>
</tr>
<tr style='vertical-align:top' id='<?php echo $name; ?>_row'>
<th scope="row"><label for='<?php echo $name; ?>'><?php echo esc_html( $title ); ?></label></th>
<td>
<?php
echo eme_ui_select( $option_value, $name, $list );
if ( ! empty( $description ) ) {
echo '<br>' . $description;
}
?>
</td>
</tr>
<?php
}

Expand All @@ -198,17 +199,17 @@ function eme_options_multiselect( $title, $name, $list, $description, $option_va
$option_value_arr = $option_value;
}
?>
<tr style='vertical-align:top' id='<?php echo $name; ?>_row'>
<th scope="row"><label for='<?php echo $name; ?>'><?php echo esc_html( $title ); ?></label></th>
<td>
<?php
echo eme_ui_multiselect( $option_value_arr, $name, $list, 5, '', 0, $class );
if ( ! empty( $description ) ) {
echo '<br>' . $description;
}
?>
</td>
</tr>
<tr style='vertical-align:top' id='<?php echo $name; ?>_row'>
<th scope="row"><label for='<?php echo $name; ?>'><?php echo esc_html( $title ); ?></label></th>
<td>
<?php
echo eme_ui_multiselect( $option_value_arr, $name, $list, 5, '', 0, $class );
if ( ! empty( $description ) ) {
echo '<br>' . $description;
}
?>
</td>
</tr>
<?php
}

Expand Down Expand Up @@ -577,4 +578,10 @@ function eme_ui_number( $option_value, $name, $required = 0, $class = '', $extra
$name = wp_strip_all_tags( $name );
return "<input type='number' $required_att $class_att $extra_attributes name='{$name}' id='{$name}' value='$option_value'>";
}

function eme_get_field_id ( $field_name, $number = 1) {
$field_name = str_replace( array( '[]', '[', ']' ), array( '', '-', '' ), $field_name );
$field_name = trim( $field_name, '-' );
return 'emefield-' . $number . '-' . $field_name;
}
?>
4 changes: 2 additions & 2 deletions events-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/*
Plugin Name: Events Made Easy
Version: 2.4.10
Version: 2.4.11
Plugin URI: https://www.e-dynamics.be/wordpress
Update URI: https://github.com/liedekef/events-made-easy/
Description: Manage and display events and memberships. Also includes recurring events; locations; widgets; maps; RSVP; ICAL and RSS feeds; Paypal, 2Checkout and others.
Expand Down Expand Up @@ -69,7 +69,7 @@
require_once 'class-expressivedate.php';

// Setting constants
define( 'EME_VERSION', '2.4.10' );
define( 'EME_VERSION', '2.4.11' );
define( 'DEFAULT_CAP_ADD_EVENT', 'edit_posts' );
define( 'DEFAULT_CAP_AUTHOR_EVENT', 'publish_posts' );
define( 'DEFAULT_CAP_PUBLISH_EVENT', 'publish_posts' );
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.e-dynamics.be/wordpress
Tags: events, memberships, locations, bookings, calendars, maps, payment gateways, drip content
Requires at least: 5.4
Tested up to: 6.3
Stable tag: 2.4.10
Stable tag: 2.4.11
Requires PHP: 8.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -98,6 +98,9 @@ Events list and calendars can be added to your blogs through widgets, shortcodes
See the FAQ section at the [Official site](https://www.e-dynamics.be/wordpress/).

== Changelog ==
= 2.4.11 (2023/10/12) =
* Fix an error when saving an event

= 2.4.10 (2023/10/11) =
* The CSV output generated by the CSV button in the admin backend (when showing tables) now uses the EME generic setting for the CSV seperator
* Allow all people-placeholders in the task signup form (ADDRESS1, ... too) and also #_GDPR
Expand Down

0 comments on commit eb51c64

Please sign in to comment.