Property | Type | Description | |
---|---|---|---|
$query_vars | The query variables passed to our route | ||
$slug | The slug for the route |
Method | Description | |
---|---|---|
__construct ( string $slug = RTMEDIA_MEDIA_SLUG ) | Initialise the route | |
is_template ( ) : boolean | Checks if the route has been requested | |
rt_replace_the_content ( string $content = '' ) : mixed | string | void | This fun little function fills up some WordPress globals with dummy data to stop your average page template from complaining about it missing. | |
rt_theme_compat_reset_post ( $args = [] ) | ||
set_query_vars ( ) | Break the request URL into an array of variables after the route slug | |
slug ( string $slug ) | Check if there is a constant defined for this route and use that instead So, this can be overridden by defining RTMEDIA_MEDIA_SLUG in wp-config.php | |
template_include ( string $template ) : string | Hook into the template_include filter to load custom template files | |
template_redirect ( ) | Hook into the template redirect action to populate the global objects |
public __construct ( string $slug = RTMEDIA_MEDIA_SLUG ) | ||
$slug | string | The slug for which the route needs to be registered, for eg, /media/ |
public is_template ( ) : boolean | ||
return | boolean |
public set_query_vars ( ) |
public template_include ( string $template ) : string | ||
$template | string | Template file path of the default template |
return | string | File path of the template file to be loaded |
public template_redirect ( ) |