Autogenerated_Series::checksum_matches( WP_Post $post )

Returns whether the current Series post checksum matches the stored version or not.

If no checksum exists for the Series, then it will be calculated and stored.


Parameters

$post

(WP_Post) (Required) A reference to the Series post object.


Top ↑

Return

(bool) Whether the current Series post checksum value matches the stored one or not.


Top ↑

Source

File: src/Events_Pro/Custom_Tables/V1/Series/Autogenerated_Series.php

	public function checksum_matches( WP_Post $post ) {
		$expected = get_post_meta( $post->ID, self::CHECKSUM_META_KEY, true );
		$current  = $this->calculate_post_checksum( $post );

		if ( empty( $expected ) ) {
			// First time we check it.
			update_post_meta( $post->ID, self::CHECKSUM_META_KEY, $current );

			return true;
		}

		return $expected === $current;
	}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.