Last active
November 22, 2020 16:13
-
-
Save alanef/57695262bca9f44314d90df33a22d51b to your computer and use it in GitHub Desktop.
Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* before doing this check if $_GET['event_id'] is set e.g. | |
| if ( ! isset($_GET['event_id']) { | |
| // return or do error stuff | |
| } | |
| */ | |
| $event_id=sanitize_text_field($_GET['event_id']); | |
| $event_id=wp_unslash($event_Id); | |
| $date = get_post_meta($event_id, '_mdjm_event_date', true ); | |
| /* or combine it all */ | |
| $date = get_post_meta( | |
| wp_unslash( | |
| sanitize_text_field( | |
| $_GET['event_id'] | |
| ) | |
| ), | |
| '_mdjm_event_date', | |
| true | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment