Support » Plugin: If Menu - Visibility control for Menu Items » “create_function()” is depricated on php 7.2

  • wp-content/plugins/if-menu/if-menu.php L. 39
    Function create_function() is deprecated

    http://php.net/manual/en/function.create-function.php

    Its depricated on php 7.2, can you update the code, so it doesn’t use “create function”, so it doesn’t throw notices to error log.

    for example to:

    add_filter( 'wp_edit_nav_menu_walker', [__CLASS__, 'get_If_Menu_Walker_Nav_Menu_Edit']);
    
    public static function get_If_Menu_Walker_Nav_Menu_Edit() {
    return 'get_If_Menu_Walker_Nav_Menu_Edit';
    }
  • The topic ‘“create_function()” is depricated on php 7.2’ is closed to new replies.