library wp-context
A WordPress context library based on WordPress' built-in template hierarchy.
wpscholar/wp-context
A WordPress context library based on WordPress' built-in template hierarchy.
- Thursday, October 26, 2017
- by wpscholar
- Repository
- 2 Watchers
- 2 Stars
- 22 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 57 % Grown
WordPress Context
A WordPress context library based on WordPress' built-in template hierarchy., (*1)
What It Does
Designed to be used after the main WordPress query has run, this context library will return an array of slugs representing the current context., (*2)
How to Use It
- Add to your project via Composer:
$ composer require wpscholar/wp-context
- Make sure you have added the Composer autoloader to your project:
<?php
require __DIR__ . '/vendor/autoload.php';
- Call the static method for fetching context:
<?php
use wpscholar\WordPress\Context;
$context = Context::getContext();
dev-master
9999999-dev
A WordPress context library based on WordPress' built-in template hierarchy.
Sources
Download
GPL-2.0+
1.0.1
1.0.1.0
A WordPress context library based on WordPress' built-in template hierarchy.
Sources
Download
GPL-2.0+
1.0
1.0.0.0
A WordPress context library based on WordPress' built-in template hierarchy.
Sources
Download
GPL-2.0+