Showing error “Function create_function() is deprecated”

Problem lies in your theme. It’s not compatible with PHP 7.2.

In this version the create_function is deprecated and you should use Anonymous Functions instead.

So for example instead of something like this:

$callback = create_function('', 'echo "'.str_replace('"', '\"', $section['desc']).'";');

You should use this:

$callback = function() {
    echo str_replace('"', '\"', $section['desc']);
};

Leave a Comment