Filter
rpress_template_paths
On this page
Filters the directories searched for RestroPress templates.
Runs in rpress_get_theme_template_paths(). The value is an array of paths keyed by priority: 1 for the child theme template directory, 10 for the parent theme and 100 for the plugin's own templates. Lower numbers are checked first. Paths are sorted numerically and given trailing slashes after the filter.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$file_paths | array | Template directory paths keyed by numeric priority. |
Return value#
array. Template directory paths keyed by priority.
Example#
function my_template_paths( $file_paths ) {
$file_paths[5] = WP_CONTENT_DIR . '/my-restropress-templates';
return $file_paths;
}
add_filter( 'rpress_template_paths', 'my_template_paths' );
Source#
Applied in:
includes/template-functions.php(line 699), inrpress_get_theme_template_paths()
See also#
Was this page helpful?
