Download the PHP package mejta/wp-latte without Composer

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

Nette Latte Engine for WordPress

This mu-plugin gives theme and plugin developers availability to write templates with Nette Latte v2.5.

Requirements

WordPress: 4.7+ PHP: 5.6.0+ License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html

Instalation with Composer

  1. Go to wp-content/mu-plugins folder and require wp-latte with composer require mejta/wp-latte command.
  2. Don't forget to load composer dependencies in your loader (e.g. wp-content/mu-plugins/load.php):

Instalation with Git

  1. Go to wp-content/mu-plugins folder and clone the repository with git clone [email protected]:mejta/wp-latte.git command.
  2. Go to plugin folder with cd wp-latte
  3. Install composer dependencies with composer install
  4. Don't forget to load the plugin in your loader (e.g. wp-content/mu-plugins/load.php):

Usage

After plugin activation, you can use Nette Latte templates in your theme. Just use .latte file extension instead of .php. Template files with .php extension will continue to work, but that templates will have lower priority in template resolution.

There are limitations with header.php and footer.php. You should use instead {php wp_head()} and {php wp_footer()} macro inside layout file. If you need to use header.php and footer.php file (e.g. for WooCommerce plugin), leave that files blank.

If you want to have a fallback for a case when the plugin is not activated, add index.php inside your theme folder with some meaningful message that says that there is plugin needed.

You can also define your custom filters and macros. Use the following code in your functions.php file.

If you want define custom post template, create a template file in theme root directory and put the comment block at the begining of the file like this:

Contribution

Feel free to improve the plugin and open pull request in the Github repository.


All versions of wp-latte with dependencies

PHP Build Version
Package Version
Requires latte/latte Version ^v2.11
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 mejta/wp-latte contains the following files

Loading the files please wait ....