I have a lot Plugins there was create_function depracated, the most i have fixed (Thanks for alle here the help a Newbie to learn coding), but there is on the dont work and i became a Error500. The Code:

add_settings_section('wdpv_voting', __('Abstimmungseinstellungen', 'wdpv'), create_function('', ''), 'wdpv_options_page');

I tried: add_settings_section('wdpv_voting', __('Abstimmungseinstellungen', 'wdpv'), function(){ 'wdpv_options_page'; }); but dont work, Error 500. I think the Problem is { 'wdpv_options_page'; }. Have anyone a Solution and can explain me the Solution so i can make same fixes in my other Projects?

  • 1
    that create_function is a non-operation aka function(){}, your attempted replacement is not valid syntax ( 'hello world'; is not a valid PHP statement, it must be assigned to something ). Note that this isn't a WordPress question, it's a generic PHP question, those are better asked on stackoverflow – Tom J Nowell Mar 29 at 23:47

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.