Rareloop / lumberjack

Lumberjack is a powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code.
https://lumberjack.rareloop.com
MIT License
371 stars 34 forks source link

Deprecation warning for Timber\Helper::function_wrapper() #3

Closed philmmoore closed 6 years ago

philmmoore commented 7 years ago

Emitted from lumberjack/src/Core/Site.php

$data['wp_title'] = TimberHelper::function_wrapper('wp_title', ['|', false, 'right']);

Instead, we can reference the Timber FunctionWrapper directly as suggested by the deprecation warning.

use Timber\FunctionWrapper as TimberFunctionWrapper;
$data['wp_title'] = new TimberFunctionWrapper('wp_title', ['|', false, 'right']);