Tribe__Events__Aggregator__Settings::get_import_process_class( null|string $slug = null )
Returns the currently selected, or a specific, import process class.
Contents
Parameters
- $slug
-
(null|string) (Optional) The slug of the import process class to return; if not specified then the default import process class will be returned. If the slug is not available then the default class will be returned.
Default value: null
Return
(string) The import process class for the specified slug or the default class if the slug was not specified or is not available.
Source
File: src/Tribe/Aggregator/Settings.php
public function get_import_process_class( $slug = null ) {
$default_slug = $this->get_import_process_default( false );
$default_class = $this->get_import_process_default();
$available = $this->get_import_process_options();
if ( null === $slug ) {
$slug = tribe_get_option( 'tribe_aggregator_import_process_system', $default_slug );
}
$class = Tribe__Utils__Array::get( $available, $slug, $default_class );
/**
* Filters the import process class that will be returned for an import process slug.
*
* @since 4.6.23
*
* @param string $class The import process slug for the slug or the default class if the
* slug was not specified or the specified slug is not available.
* @param string|null $slug The specified slug or `null` if not specified.
* @param array $available A map of available process classes in the shape
* [ <slug> => <class> ].
*/
$class = apply_filters( 'tribe_aggregator_import_process', $class, $slug, $available );
return $class;
}
Changelog
| Version | Description |
|---|---|
| 4.6.23 | Introduced. |