Tribe__Events__Rewrite::archive( array|string $regex, array $args = array() )
Alias to $this->add() but adding the archive base first
Contents
Parameters
- $regex
-
(array|string) (Required) The regular expression to catch the URL
- $args
-
(array) (Optional) The arguments in which the regular expression "alias" to
Default value: array()
Return
Source
File: src/Tribe/Rewrite.php
public function archive( $regex, $args = array() ) {
$default = array(
'post_type' => Tribe__Events__Main::POSTTYPE,
);
$args = array_filter( wp_parse_args( $args, $default ) );
$regex = array_merge( array( $this->bases->archive ), (array) $regex );
return $this->add( $regex, $args );
}