Tribe__Events__Repositories__Organizer::__construct()

Tribe__Events__Repositories__Organizer constructor.

Contents

Sets up the repository default parameters and schema.


Source

File: src/Tribe/Repositories/Organizer.php

	public function __construct() {
		parent::__construct();

		$this->create_args['post_type'] = Tribe__Events__Organizer::POSTTYPE;

		$this->default_args = array(
			'post_type'                    => Tribe__Events__Organizer::POSTTYPE,
			// We'll be handling the dates, let's mark the query as a non-filtered one.
			'tribe_suppress_query_filters' => true,
		);

		// Add organizer specific aliases.
		$this->update_fields_aliases = array_merge( $this->update_fields_aliases, array(
			'organizer' => 'post_title',
			'phone'     => '_OrganizerPhone',
			'website'   => '_OrganizerWebsite',
			'email'     => '_OrganizerEmail',
		) );

		$this->linked_id_meta_key = '_EventOrganizerID';

		$this->schema = array_merge( $this->schema, array(
			'name' => array( $this, 'filter_by_name' ),
		) );

		$this->add_simple_meta_schema_entry( 'email', '_OrganizerEmail' );
		$this->add_simple_meta_schema_entry( 'phone', '_OrganizerPhone' );
		$this->add_simple_meta_schema_entry( 'website', '_OrganizerWebsite' );
	}

Top ↑

Changelog

Changelog
Version Description
4.9 Introduced.