Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
antiseptikk committed Dec 4, 2019
0 parents commit 74640a9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "agencearcange/wp-twig-dump",
"description": "Allow dump() in twig templates",
"keywords": ["wordpress", "plugin", "timber", "twig"],
"homepage": "https://github.com/agencearcange/arcange-wpdump",
"type": "wordpress-muplugin",
"license": "GPLv2",
"require": {
"hellonico/twig-dump-extension": "^1.0",
"wpackagist-plugin/timber-library": "^1.0"
}
}
13 changes: 13 additions & 0 deletions wp-twig-dump.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Plugin Name: WP Twig dump()
* Description: Var Dumper if WP_DEBUG_DISPLAY == true For Timber Library
* Version: 1.0
*/

if (defined('WP_DEBUG_DISPLAY') && WP_DEBUG && function_exists('add_filter')) {
add_filter('timber/loader/twig', function($twig) {
$twig->addExtension(new HelloNico\Twig\DumpExtension());
return $twig;
});
}

0 comments on commit 74640a9

Please sign in to comment.