Post_Actions::get_occurrence_action_links( TECEventsCustom_TablesV1ModelsOccurrence $occurrence )

Returns the action links for an occurrence.


Parameters

$occurrence

(TECEventsCustom_TablesV1ModelsOccurrence) (Required) The occurrence to get the action links for.


Top ↑

Return

(TECEvents_ProCustom_TablesV1Updatesarray<string,string>) An map of action links.


Top ↑

Source

File: src/Events_Pro/Custom_Tables/V1/Updates/Post_Actions.php

	public function get_occurrence_action_links( Occurrence $occurrence ): array {
		$event = Event::where( 'event_id', $occurrence->event_id )->first();

		if ( ! ( $event instanceof Event && $event->rset ) ) {
			return [];
		}

		$actions['edit-single'] = sprintf(
			'<a data-confirm="%s" class="tec-edit-link" href="%s" target="_blank" rel="noreferrer noopener">%s</a>',
			esc_attr_x( 'Are you sure you want to convert this recurring event instance into a single event? This cannot be undone.', 'Confirmation message', 'tribe-events-calendar-pro' ),
			$occurrence->get_single_edit_post_link(),
			esc_attr_x( 'Convert to Single', 'Link title', 'tribe-events-calendar-pro' )
		);

		return $actions;
	}

Top ↑

Changelog

Changelog
Version Description
6.0.1 Introduced.