Map_View::prev_url( bool $canonical = false, array $passthru_vars = array() )
{@inheritDoc}
Contents
Parameters
- $canonical
-
(bool) (Optional) Whether to return the canonical version of the URL or the normal one.
Default value: false
- $passthru_vars
-
(array) (Optional) An array of query arguments that will be passed thru intact, and appended to the URL.
Default value: array()
Return
(string) The URL associated to this View logical, next view or an empty string if no previous View exists.
Source
File: src/Tribe/Views/V2/Views/Map_View.php
public function prev_url( $canonical = false, array $passthru_vars = [] ) { $current_page = (int) $this->context->get( 'page', 1 ); $display = $this->context->get( 'event_display_mode', $this->slug ); if ( 'past' === $display ) { $url = parent::next_url( $canonical, [ 'eventDisplay' => 'past' ] ); } elseif ( $current_page > 1 ) { $url = parent::prev_url( $canonical ); } else { $url = $this->get_past_url( $canonical ); } $url = $this->filter_prev_url( $canonical, $url ); return $url; }
Changelog
Version | Description |
---|---|
4.9.3 | Introduced. |