Download the PHP package chameleon2die4/wp-router without Composer

On this page you can find all versions of the php package chameleon2die4/wp-router. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-router

WP Router

PHP Composer Latest Version Packagist PHP Version Require License

Provides a simple API for mapping requests to callback functions.

Description

WordPress's rewrite rules and query variables provide a powerful system for mapping URL strings to collections of posts. Every request is parsed into query variables and turned into a SQL query via $wp_query->query().

Sometimes, though, you don't want to display a list of posts. You just want a URL to map to a callback function, with the output displayed in place of posts in whatever theme you happen to be using.

That's where WP Router comes in. It handles all the messy bits of registering post types, query variables, rewrite rules, etc., and lets you write code to do what you want it to do. One function call is all it takes to map a URL to your designated callback function and display the return value in the page.

Installation

Composer:

Browse into directory and run;

Requirements:

Uninstall

After remove package use flush_rewrite_rules() function.

Usage

Creating Routes

Example:

In this example, the path http://example.com/wp_router/my_sample_path/ will call the function sample_callback in the calling class. The value of the sample_argument query variable, in this case "my_sample_path", will be provided as the first and only argument to the callback function. If the file sample-page.php is found in the theme, it will be used as the template, otherwise sample-page.php in your plugin directory will be used (if that's not found either, fall back to route-wp-router-sample.php, etc.).

Editing Routes

You can hook into the wp_router_alter_routes action to modify routes created by other plugins. The callback should take one argument, a WP_Router object.

Public API Function

Creating or changing routes should always occur in the context of the wp_router_generate_routes or wp_router_alter_routes actions, using the WP_Router object supplied to your callback function.


All versions of wp-router with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chameleon2die4/wp-router contains the following files

Loading the files please wait ....