View::get_url_args()

Returns the View current URL query arguments, parsed from the View get_url() method.

Since there are a number of parties filtering each View URL arguments, this method will parse a View URL query arguments from its filtered URL. This will include all the modifications done to a View URL by other plugins and add-ons.


Return

(TribeEventsViewsV2array<string,mixed>) The current View URL args or an empty array if the View URL is empty or not valid..


Top ↑

Source

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

	public function get_url_args() {
		$view_url       = $this->get_url( false );
		$view_query_str = wp_parse_url( $view_url, PHP_URL_QUERY );
		if ( empty( $view_query_str ) ) {
			// This might happen if the URL is too mangled to be parsed.
			return [];
		}
		parse_str( $view_query_str, $view_query_args );

		return (array) $view_query_args;
	}

Top ↑

Changelog

Changelog
Version Description
5.3.0 Introduced.