Tribe__Tickets__Tickets_Handler::save_post( int $post )

Saves the Ticket Editor related tickets on Save of the Parent Post

Due to how we can have multiple Post Types where we can attach tickets we have one place where all panels will save, because save_post_$post_type requires a loop


Parameters

$post

(int) (Required) Post that will be saved


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Tickets_Handler.php

	public function save_post( $post ) {
		// We're calling this during post save, so the save nonce has already been checked.

		// don't do anything on autosave, auto-draft, or massupdates
		if ( wp_is_post_autosave( $post ) || wp_is_post_revision( $post ) ) {
			return false;
		}

		if ( ! $post instanceof WP_Post ) {
			$post = get_post( $post );
		}

		// Bail on Invalid post
		if ( ! $post instanceof WP_Post ) {
			return false;
		}

		$this->save_form_settings( $post );
		$this->save_order( $post );

		/**
		 * Allows us to Run any actions related to a Post that has Tickets
		 *
		 * @since  4.6.2
		 *
		 * @param  WP_Post $post Which post we are saving
		 */
		do_action( 'tribe_tickets_save_post', $post );
	}

Top ↑

Changelog

Changelog
Version Description
4.6.2 Introduced.