Download the PHP package tombroucke/wp-sidewheels without Composer

On this page you can find all versions of the php package tombroucke/wp-sidewheels. 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-sidewheels

WP Sidewheels

This package provides an easy way to create custom routes (MVC), roles, Custom post types, ... using a config file.

Installation

Add this package to your plugin dependencies

composer require tombroucke/wp-sidewheels

Initialize sidewheels your plugin:

dirname(__FILE__) is where your config.php file resides.

Add to your plugin activation hook:

Add to your plugin deactivation hook:

add config.php to your plugin root directory

Important notice

After adding new routes, you need to manually flush your rewrite rules.

Example configuration file

MVC

Controller:

For each route, you need to define a callback. This can be an inline function or a controller.

View:

This package uses twig as it's templating engine. You can pass variable to your templates, e.g. 'website'. The route object is also passed in as a variable, so you can use {{ route.title }} for example. You can call public methods from your controller.

By default, the very basic vendor/tombroucke/wp-sidewheels/templates/sidewheels.php template will be loaded for all endpoints. You can add a sidewheels.php template in your views directory, or in your theme root directory. You can use the sidewheels_template_paths filter to load a custom template based on a specific route or other logic.

Filters

Deny access to certain routes

Manipulate title, will override the title in config file

Title can also be set from controller $this->route()->setTitle('title');, but this filter will override everything.

Add custom functions to be used in your twig templates.

Adding routes

You can add routes outside of the config file:


All versions of wp-sidewheels with dependencies

PHP Build Version
Package Version
Requires twig/twig Version ^3.0
johnbillion/extended-cpts Version ^5.0
squizlabs/php_codesniffer Version ^3.6
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 tombroucke/wp-sidewheels contains the following files

Loading the files please wait ....