Tribe__Tickets_Plus__Meta__Export::add_orphaned_column( string $key )
Add orphaned column to the export based on what we have for the event attendees.
Contents
Parameters
- $key
-
(string) (Required) the column key
- $value
-
(string) (Required) the column label
Return
(array) $field
Source
File: src/Tribe/Meta/Export.php
public function add_orphaned_column( $key ) {
// Bail if the field is already part of the columns
if ( $this->column_exists( $key ) ) {
return false;
}
// Add the column with a format that
// can be processed by the exporter
$field = array();
$field['type'] = 'orphaned';
$field['slug'] = $key;
$field['label'] = ucwords( str_replace( '-', ' ', str_replace( '_', ': ', $key ) ) );
// Add the field to the columns
$this->meta_columns[] = (object) $field;
return $field;
}
Changelog
| Version | Description |
|---|---|
| 4.8.3 | Introduced. |