\WP_Stager_Integration\Calendar::get_filter_taxonomy_options(bool $original = false): array
\WP_Stager_Integration\Calendar::get_filter_taxonomy_options(bool $original = false): arrayDescription
Get an array of Stager Event field labels keyed by their raw field name.
Returns a selection of all avaiable Stager Event fields, including only the fields that have a label defined from within the plugin.
Returns an array of field => label pairs.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$original | bool | Whether to return the original labels or the custom labels from the plugin settings. Defaults to false, returns custom labels. |
Returns:
array<string,string>
Information
| File | class-calendar.php line 2197 |
|---|
Full Code
/**
* Get an array of Stager Event field labels keyed by their raw field name.
*
* Returns a selection of all avaiable Stager Event fields, including only the fields that have a label defined from within the plugin.
*
* Returns an array of field => label pairs.
*
* @param bool $original Whether to return the original labels or the custom labels from the plugin settings. Defaults to false, returns custom labels.
*
* @return array<string,string>
*/
public static function get_filter_taxonomy_options( $original = false ) {
// Type casting
$original = (bool) $original;
// Define taxonomies
$taxonomies = array(
'type',
'tags',
'status',
'location.name',
'location.spaces.name',
'location.city',
'location.country',
'ticketGroups.name',
'eventLabels.name',
'customerInterests.name',
'programItems.name',
);
// Init
$options = array();
// Loop over taxonomies
foreach ( $taxonomies as $taxonomy ) {
// Get label
$label = (string) self::get_filter_taxonomy_label( $taxonomy, $original );
// Continue if label is empty
if ( $label === '' ) {
continue;
}
// Add to options
$options[ $taxonomy ] = $label;
}
return $options;
}💡 If you ever get stuck or have a question, please check our FAQs, our Free Integration Service, our paid Full Integration Service, or reach out to us!

Get WP Stager Integration
🎁 Limited offer: Use code WELCOME26 to get your first month for free!

