Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/sitepres.../lib/twig/src/Extensio...
File: StringLoaderExtension.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* This file is part of Twig.
[3] Fix | Delete
*
[4] Fix | Delete
* (c) Fabien Potencier
[5] Fix | Delete
*
[6] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[7] Fix | Delete
* file that was distributed with this source code.
[8] Fix | Delete
*/
[9] Fix | Delete
namespace WPML\Core\Twig\Extension;
[10] Fix | Delete
[11] Fix | Delete
use WPML\Core\Twig\TwigFunction;
[12] Fix | Delete
/**
[13] Fix | Delete
* @final
[14] Fix | Delete
*/
[15] Fix | Delete
class StringLoaderExtension extends \WPML\Core\Twig\Extension\AbstractExtension
[16] Fix | Delete
{
[17] Fix | Delete
public function getFunctions()
[18] Fix | Delete
{
[19] Fix | Delete
return [new \WPML\Core\Twig\TwigFunction('template_from_string', 'twig_template_from_string', ['needs_environment' => \true])];
[20] Fix | Delete
}
[21] Fix | Delete
public function getName()
[22] Fix | Delete
{
[23] Fix | Delete
return 'string_loader';
[24] Fix | Delete
}
[25] Fix | Delete
}
[26] Fix | Delete
\class_alias('WPML\\Core\\Twig\\Extension\\StringLoaderExtension', 'WPML\\Core\\Twig_Extension_StringLoader');
[27] Fix | Delete
namespace WPML\Core;
[28] Fix | Delete
[29] Fix | Delete
use WPML\Core\Twig\Environment;
[30] Fix | Delete
use WPML\Core\Twig\TemplateWrapper;
[31] Fix | Delete
/**
[32] Fix | Delete
* Loads a template from a string.
[33] Fix | Delete
*
[34] Fix | Delete
* {{ include(template_from_string("Hello {{ name }}")) }}
[35] Fix | Delete
*
[36] Fix | Delete
* @param string $template A template as a string or object implementing __toString()
[37] Fix | Delete
* @param string $name An optional name of the template to be used in error messages
[38] Fix | Delete
*
[39] Fix | Delete
* @return TemplateWrapper
[40] Fix | Delete
*/
[41] Fix | Delete
function twig_template_from_string(\WPML\Core\Twig\Environment $env, $template, $name = null)
[42] Fix | Delete
{
[43] Fix | Delete
return $env->createTemplate((string) $template, $name);
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function