Download the PHP package lumenpress/routing without Composer
On this page you can find all versions of the php package lumenpress/routing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package routing
WordPress Routing
The routing needs to be used with lumenpress/laravel or lumenpress/lumen.
Installation
Register the provider in bootstrap/app.php:
It should be noted that Laravel must also be registered in the bootstrap/app.php file, otherwise it will not work properly.
Usage
We must first get an instance of the WordPress router.
Or use the router service container as a facade.
Routing
As a facade.
Conditions
Route Parameters
template
Query Condition
| function | theme file |
|---|---|
| is_page_template($template) | $template.php |
Route Condition
['template' => string|array $template]
Callback Arguments
LumenPress\Nimble\Models\Post $post;
page
Query Condition
| function | theme file |
|---|---|
| is_page() | page.php |
| is_page($id) | page-$id.php |
| is_page($slug) | page-$slug.php |
Route Condition
page['page' => int|string|array $page]
Callback Arguments
LumenPress\Nimble\Models\Post $postoptional;
single
Query Condition
| function | theme file |
|---|---|
| is_single() | single.php |
| is_singular($posttype) | single-$posttype.php |
| is_singular($posttype) && is_single($slug) | single-$posttype-$slug.php |
Route Condition
single['single' => int|string|array $post]
Callback Arguments
LumenPress\Nimble\Models\Post $postoptional;
singular
Query Condition
| function | theme file |
|---|---|
| is_singular() | singular.php |
| is_singular($posttype) | single-$posttype.php |
Route Condition
singular['singular' => string|array $posttype]
Callback Arguments
LumenPress\Nimble\Models\Post $postoptional;
attachment
Query Condition
| function | theme file |
|---|---|
| is_attachment() | attachment.php |
Route Condition
attachment
Callback Arguments
LumenPress\Nimble\Models\Attachment $attachmentoptional;
embed
Since 4.5
Query Condition
| function | theme file |
|---|---|
| is_embed() | embed.php |
Route Condition
embed
Callback Arguments
LumenPress\Nimble\Models\Post $postoptional;
archive
Query Condition
| function | theme file |
|---|---|
| is_archive() | archive.php |
| is_post_type_archive($postType) | archive-$postType.php |
Route Condition
archive['archive' => string|array $postType]
Callback Arguments
string $postTypeoptional;
tax
Query Condition
| function | theme file |
|---|---|
| is_tax() | taxonomy.php |
| is_tax($taxonomy) | taxonomy-$taxonomy.php |
| is_tax($taxonomy, $term) | taxonomy-$taxonomy-$term.php |
Route Condition
tax['tax' => string|array $taxonomy]['tax' => ...[string|array $taxonomy, int|string|array string|array $term]]
Callback Arguments
LumenPress\Nimble\Models\Taxonomy $taxonomyoptional;
category
Query Condition
| function | theme file |
|---|---|
| is_category() | category.php |
| is_category($id) | category-$id.php |
| is_category($slug) | category-$slug.php |
Route Condition
category['category' => string|array $category]
Callback Arguments
LumenPress\Nimble\Models\Category $categoryoptional;
tag
Query Condition
| function | theme file |
|---|---|
| is_tag() | tag.php |
| is_tag($id) | tag-$id.php |
| is_tag($slug) | tag-$slug.php |
Route Condition
tag['tag' => string|array $tag]
Callback Arguments
LumenPress\Nimble\Models\Tag $tagoptional;
author
Query Condition
| function | theme file |
|---|---|
| is_author() | author.php |
| is_author($id) | author-$id.php |
| is_author($nicename) | author-$nicename.php |
Route Condition
author['author' => int|string|array $author]
Callback Arguments
LumenPress\Nimble\Models\User $authoroptional;
date
Query Condition
| function | theme file |
|---|---|
| is_date() | date.php |
Route Condition
date
Callback Arguments
$yearoptional;$monthoptional;$dayoptional;
home
Query Condition
| function | theme file |
|---|---|
| is_home() | home.php |
Route Condition
home
front
Query Condition
| function | theme file |
|---|---|
| is_front_page() | front_page.php |
Route Condition
front
search
Query Condition
| function | theme file |
|---|---|
| is_search() | search.php |
Route Condition
search
404
Query Condition
| function | theme file |
|---|---|
| is_404() | 404.php |
Route Condition
404