Tribe__Events__Aggregator__Settings::get_import_range_options( bool $title = true )

Returns the range options available for imports.

Titles are meant to be used in titles and make sense alone, range strings are meant to be used when using the duration in a sentence and do not make sense alone.


Parameters

$title

(bool) (Optional) Whether the values of the array should be for title or for use as range.

Default value: true


Top ↑

Return

(array) An associative array of durations and strings.


Top ↑

Source

File: src/Tribe/Aggregator/Settings.php

	public function get_import_range_options( $title = true ) {
		$options = $this->get_range_options();

		/**
		 * Filters the options available for the import date range.
		 *
		 * @since 4.5.13
		 *
		 * @param array $options An array of arrays in the format
		 *                       [ <range duration in seconds> => [ 'title' => <title>, 'range' => <range> ] ].
		 */
		$options = apply_filters( 'tribe_aggregator_import_range_options', $options );

		if ( $title ) {
			return array_combine( array_keys( $options ), wp_list_pluck( $options, 'title' ) );
		}

		return array_combine( array_keys( $options ), wp_list_pluck( $options, 'range' ) );
	}

Top ↑

Changelog

Changelog
Version Description
4.5.13 Introduced.