Tribe__Events__Aggregator__Settings::get_import_process_options( bool $pretty = false )

Returns a filtered map of import process slugs to classes.


Parameters

$pretty

(bool) (Optional) Whether to return human-readable and "pretty" name for the process or the class names.

Default value: false


Top ↑

Return

(array) A map of import process slugs to classes or names in the shape [ <slug> => <class_or_name> ].


Top ↑

Source

File: src/Tribe/Aggregator/Settings.php

	public function get_import_process_options( $pretty = false ) {
		$options = array(
			'async' => array(
				'class' => 'Tribe__Events__Aggregator__Record__Async_Queue',
				'name'  => __( 'Asynchronous', 'the-events-calendar' ),
			),
			'cron'  => array(
				'class' => 'Tribe__Events__Aggregator__Record__Queue',
				'name'  => __( 'Cron-based', 'the-events-calendar' ),
			),
		);

		/**
		 * Filters the map of available import process options.
		 *
		 * @since 4.6.23
		 *
		 * @param array $options A map of import process options to import process classes
		 *                       in the shape [ <slug> => [ 'class' => <class>, 'name' => <name> ] ].
		 * @param bool $pretty Whether to return human-readable and "pretty" names for the options (`true`)
		 *                     or the class names ('false').
		 */
		$options = apply_filters( 'tribe_aggregator_import_process_options', $options, $pretty );

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

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

Top ↑

Changelog

Changelog
Version Description
4.6.23 Introduced.