2017 © Pedro Peláez
 

library wp-context

A WordPress context library based on WordPress' built-in template hierarchy.

image

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

The README.md

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

  1. Add to your project via Composer:
$ composer require wpscholar/wp-context
  1. Make sure you have added the Composer autoloader to your project:
<?php 

require __DIR__ . '/vendor/autoload.php';
  1. Call the static method for fetching context:
<?php

use wpscholar\WordPress\Context;

$context = Context::getContext();

The Versions

26/10 2017

dev-master

9999999-dev

A WordPress context library based on WordPress' built-in template hierarchy.

  Sources   Download

GPL-2.0+

26/10 2017

1.0.1

1.0.1.0

A WordPress context library based on WordPress' built-in template hierarchy.

  Sources   Download

GPL-2.0+

15/09 2017

1.0

1.0.0.0

A WordPress context library based on WordPress' built-in template hierarchy.

  Sources   Download

GPL-2.0+