src/Templates.php
private static function extendTwig (\Twig_Environment $twig_Environment)
    {
        $twig_Environment->addFilter(new \Twig_SimpleFilter('__', function ($text, $domain = 'default') {
            return __($text, $domain);
        }));
        $twig_Environment->addExtension(new SlugifyExtension(Slugify::create()));
    }
private static function extendTwig (\Twig_Environment $twig_Environment)
    {
        $twig_Environment->addFilter(new \Twig_SimpleFilter('__', function ($text, $domain = 'default') {
            return __($text, $domain);
        }));
        $twig_Environment->addExtension(new SlugifyExtension(Slugify::create()));
    }
private static function extendTwig ( \ Twig_Environment $ twig_Environment ) { $ twig_Environment -> addFilter ( new \ Twig_SimpleFilter ( '__' , function ( $ text , $ domain = 'default' ) { return __ ( $ text , $ domain ) ; } ) ) ; $ twig_Environment -> addExtension ( new SlugifyExtension ( Slugify :: create ( ) ) ) ; }
Adds the WP-specific filters and functions to the twig environment
@param \Twig_Environment $twig_Environment
Adds the WP - specific filters and functions to the twig environment