View::setup_the_loop( $args = array() )

{@inheritDoc}


Source

File: src/Tribe/Views/V2/View.php

	public function setup_the_loop( array $args = [] ) {
		global $wp_query;

		$this->global_backup = [
			'wp_query'  => $wp_query,
		];

		/**
		 * Filters the arguments that will be used to build the View repository.
		 *
		 * @since 4.9.3
		 *
		 * @param  array  $args  An array of arguments that should be used to build the repository instance.
		 * @param  View   $this  The current View object.
		 */
		$this->repository_args = apply_filters( "tribe_events_views_v2_{$this->slug}_repository_args", $args, $this );

		$this->set_repository( $this->build_repository( $this->repository_args ) );
		$this->set_url( $this->repository_args, true );

		$wp_query = $this->repository->get_query();
		wp_reset_postdata();
	}