Fix Obj->__toString() conditional logic in wrapper
This commit is contained in:
@@ -46,7 +46,7 @@ add_filter('excerpt_more', function () {
|
|||||||
* Use theme wrapper
|
* Use theme wrapper
|
||||||
*/
|
*/
|
||||||
add_filter('template_include', function ($main) {
|
add_filter('template_include', function ($main) {
|
||||||
if (!is_string($main) || !(is_object($main) && method_exists($main, '__toString'))) {
|
if (!is_string($main) && !(is_object($main) && method_exists($main, '__toString'))) {
|
||||||
return $main;
|
return $main;
|
||||||
}
|
}
|
||||||
return template_wrap(new Wrapper($main));
|
return template_wrap(new Wrapper($main));
|
||||||
|
|||||||
Reference in New Issue
Block a user