wpscholar/wp-context
Composer 安装命令:
composer require wpscholar/wp-context
包简介
A WordPress context library based on WordPress' built-in template hierarchy.
README 文档
README
A WordPress context library based on WordPress' built-in template hierarchy.
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.
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();
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-09-15