Coder Social home page Coder Social logo

timber-tracy-bar-panel's Introduction

Timber Tracy Bar Panel

Latest Stable Version License

Timber Tab

What info does it show?

This tracy panel shows info about the following:

  • Dumps the current Timber context into the same format as a Tracy BarDump
  • Rendered Twig File(s)
  • Version
  • Template Directories
  • Twig Cache
  • Cache
  • Auto Meta
  • Autoescape

Timber Panel

Requirements:

Getting Started

Install via composer:

composer require srt4rulez/timber-tracy-bar-panel --dev

Add composer autoload to functions.php (You are using this in a WordPress theme right?):

require __DIR__ . '/vendor/autoload.php';

Enable tracy, then add the TimberBarPanel, like so:

Tracy\Debugger::enable( Tracy\Debugger::DEVELOPMENT );
Tracy\Debugger::getBar()->addPanel( new srt4rulez\TimberBarPanel );

You could wrap tracy in a condition for WP_DEBUG and ! is_admin() (I've experienced uploads error when tracy was enabled on admin side)

if ( WP_DEBUG && ! is_admin() ) {

	Tracy\Debugger::enable( Tracy\Debugger::DEVELOPMENT );
	Tracy\Debugger::getBar()->addPanel( new \srt4rulez\TimberBarPanel );

}

Final functions.php:

require __DIR__ . '/vendor/autoload.php';

if ( WP_DEBUG && ! is_admin() ) {

	Tracy\Debugger::enable( Tracy\Debugger::DEVELOPMENT );
	Tracy\Debugger::getBar()->addPanel( new srt4rulez\TimberBarPanel );

}

Thanks

License

MIT

timber-tracy-bar-panel's People

Contributors

srt4rulez avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

timber-tracy-bar-panel's Issues

Could not find package at any version matching your PHP version 7.1.7.0

Hi there,

I upgraded to High Sierra OS and since then I can't download Timber Tracy Bar Panel using Composer. It shows these errors:

When running composer require srt4rulez/timber-tracy-bar-panel --dev

[InvalidArgumentException]                                                                                
 Could not find package srt4rulez/timber-tracy-bar-panel at any version matching your PHP version 7.1.7.0

When I have the package on my composer.json and run composer install

 Problem 1
   - Installation request for srt4rulez/timber-tracy-bar-panel ^0.1.2 -> satisfiable by srt4rulez/timber-tracy-bar-panel[v0.1.2].
   - srt4rulez/timber-tracy-bar-panel v0.1.2 requires php ^5.4 -> your PHP version (7.1.7) does not satisfy that requirement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.