Tribe__Events__Pro__Editor__Meta::show_recurrence_classic_meta( mixed $show_meta, int $post_id )

Remove the recurrence meta box based on recurrence structure for blocks


Parameters

$show_meta

(mixed) (Required) Default value to display recurrence or not

$post_id

(int) (Required) Which post we are dealing with


Top ↑

Return

(bool)


Top ↑

Source

File: src/Tribe/Editor/Meta.php

	public function show_recurrence_classic_meta( $show_meta, $post_id ) {
		/** @var Tribe__Editor $editor */
		$editor = tribe( 'editor' );

		// Return default on non classic editor
		if ( ! $editor->is_classic_editor() ) {
			return $show_meta;
		}

		// when it doesnt have blocks we return default
		if ( ! has_blocks( absint( $post_id ) ) ) {
			return $show_meta;
		}

		return false;
	}

Top ↑

Changelog

Changelog
Version Description
4.5.3 Added $post_id param
4.5 Introduced.