Tribe__Events__Main::save_organizer_data( int $postID = null, WP_Post $post = null )

Make sure the organizer meta gets saved


Parameters

$postID

(int) (Optional) The organizer id.

Default value: null

$post

(WP_Post) (Optional) The post object.

Default value: null


Top ↑

Return

(null)


Top ↑

Source

File: src/Tribe/Main.php

		public function save_organizer_data( $postID = null, $post = null ) {
			// was an organizer submitted from the single organizer post editor?
			if ( empty( $_POST['post_ID'] ) || $_POST['post_ID'] != $postID || empty( $_POST['organizer'] ) ) {
				return;
			}

			// is the current user allowed to edit this organizer?
			if ( ! current_user_can( 'edit_tribe_organizer', $postID ) ) {
				return;
			}

			$data = stripslashes_deep( $_POST['organizer'] );
			Tribe__Events__API::updateOrganizer( $postID, $data );
		}