Tribe__Events__Pro__Editor__Recurrence__Provider::is_recurring_event( $is_recurring, $post_id )
Test if an event has only the rules being set by the block editor so it can be consider a recurring event
Contents
Parameters
- $is_recurring
-
(Required)
- $post_id
-
(Required)
Return
(bool)
Source
File: src/Tribe/Editor/Recurrence/Provider.php
public function is_recurring_event( $is_recurring, $post_id ) {
if ( $is_recurring ) {
return $is_recurring;
}
/** @var Tribe__Events__Pro__Editor__Recurrence__Blocks_Meta $blocks_meta */
$blocks_meta = tribe( 'events-pro.editor.recurrence.blocks-meta' );
$rules = get_post_meta( $post_id, $blocks_meta->get_rules_key(), true );
return ! empty( $rules );
}
Changelog
| Version | Description |
|---|---|
| 4.5 | Introduced. |