Deprecated:Function create_function() is deprecated in /nas/content/live/syn1/wp-content/plugins/foobar/includes/WP_PluginBase.php on line 822

  • if (!function_exists('load_plugin')) { function load_plugin($plugin_class, $priority = 10) { if (class_exists($plugin_class)) { add_action("init", create_function('', "global \$$plugin_class; \$$plugin_class = new $plugin_class();"), $priority); – new info Sep 19 at 18:59
  • 1
    What are you asking? If this is an error from a plugin -- and it appears to be -- you should check with the plugin's official support streams. – Pat J Sep 19 at 20:51
  • There is a problem in these lines, but I don't know where exactly – new info Sep 20 at 17:51
  • create_function() is a PHP function, and it's deprecated in PHP 7.2. Whatever plugin is using it will need to update to change this. If you're writing a plugin and using create_function(), you'll need to find another way (perhaps anonymous functions). If you're using a 3rd-party plugin that uses create_function(), you'll need to contact that plugin's support. – Pat J Sep 20 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.