djboris88/timber-commented-include 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

djboris88/timber-commented-include

最新稳定版本:2.0.0

Composer 安装命令:

composer require djboris88/timber-commented-include

包简介

Twig extension for Timber which outputs HTML comments before and after the `include` tag

README 文档

README

This is a simple port of djboris88/twig-commented-include to be used with Timber for WordPress.

It helps debugging and navigating through many Twig partials in your project. It outputs a HTML comments before and after each include statement while rendering the template. Comments look like this:

<!-- Begin output of "_partials/_navigation.twig" -->
<div class="navigation" role="navigation" data-navigation>...</div>
<!-- / End output of "_partials/_navigation.twig" -->

Installation

To install the latest stable version of this component, open a console and execute the following command:

composer require djboris88/timber-commented-include

Usage

To be able to see the commented output, WP_DEBUG has to be defined and set as true in wp-config.php file.

The Twig Extension will automatically be registered and applied. If the WordPress add_filter function is not available when that happens, it will fail. In that case, you will need to call initialization yourself at an appropriate time after WordPress itself is initialized:

if (function_exists('\Djboris88\Timber\initialize_filters')) {
  \Djboris88\Timber\initialize_filters();
}

统计信息

  • 总下载量: 39.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2018-12-03