Skip to content

Commit

Permalink
Add filter eme_fs_validate_event_filter
Browse files Browse the repository at this point in the history
  • Loading branch information
liedekef committed Jan 20, 2025
1 parent 47cd1a0 commit 0b94fd3
Show file tree
Hide file tree
Showing 3 changed files with 732 additions and 724 deletions.
4 changes: 2 additions & 2 deletions eme-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ function eme_events_page() {
$event = eme_sanitize_event( $event );
$location = eme_sanitize_location( $location );
$validation_result = eme_validate_event( $event );
if ( $validation_result != 'OK' ) {
if ( !empty($validation_result) ) {
// validation unsuccessful
echo "<div id='message' class='error '>
<p>$validation_result</p>
Expand Down Expand Up @@ -6882,7 +6882,7 @@ function eme_validate_event( $event ) {
}

if ( empty( $troubles ) ) {
return 'OK';
return '';
} else {
$message = __( 'Ach, some problems here:', 'events-made-easy' ) . "<ul>$troubles</ul>";
return $message;
Expand Down
Loading

0 comments on commit 0b94fd3

Please sign in to comment.