do_action( 'tribe_events_community_before_event_submission_page_template' )
Allow the user to add content or functions right before the submission template is loaded.
Contents
More Information
The following snippet, which uses this hook will do a page redirect after submitting an event through the Community Events submission form.
<?php
// Redirect to a given page after submitting a community event
add_action('tribe_events_community_before_event_submission_page_template', function() {
if ( isset( $_POST[ 'community-event' ] ) ) {
// The url to redirect to
$url = "/my-custom-page";
if ( wp_redirect( $url ) ) {
exit;
}
}
} );
Source
File: src/Tribe/Main.php
Changelog
| Version | Description |
|---|---|
| 1.0 | Introduced. |