Tribe__Tickets__Tickets_Handler::has_manual_update( int|WP_Post $ticket, string|null $for = null )

Verify if we have Manual Changes for a given Meta Key


Parameters

$ticket

(int|WP_Post) (Required) Which ticket/post we are dealing with here

$for

(string|null) (Optional) If we are looking for one specific key or any

Default value: null


Top ↑

Return

(boolean)


Top ↑

Source

File: src/Tribe/Tickets_Handler.php

	public function has_manual_update( $ticket, $for = null ) {
		if ( ! $ticket instanceof WP_Post ) {
			$ticket = get_post( $ticket );
		}

		if ( ! $ticket instanceof WP_Post ) {
			return false;
		}

		$updated = get_post_meta( $ticket->ID, $this->key_manual_updated );

		if ( is_null( $for ) ) {
			return ! empty( $updated );
		}

		return in_array( $for, $updated );
	}

Top ↑

Changelog

Changelog
Version Description
4.6 Introduced.