create_function in WPMovieLibrary
-
When using this plugin in the log, the following error is observed due to outdated function
[13-Jan-2019 05:00:26 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/u2865/data/www/***.ru/wp-content/plugins/wpmovielibrary/includes/config/wpmoly-admin-menu.php on line 89 [13-Jan-2019 05:00:26 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/u2865/data/www/***.ru/wp-content/plugins/wpmovielibrary/includes/config/wpmoly-admin-menu.php on line 102 [13-Jan-2019 05:00:26 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/u2865/data/www/***.ru/wp-content/plugins/wpmovielibrary/includes/config/wpmoly-admin-menu.php on line 115
Here is a code snippet with 89, 102 and 115 lines.
'collections' => array( 'page_title' => __( 'Collections', 'wpmovielibrary' ), 'menu_title' => __( 'Collections', 'wpmovielibrary' ), 'capability' => 'manage_categories', 'menu_slug' => 'edit-tags.php?taxonomy=collection&post_type=movie', 'function' => null, 'condition' => create_function('', 'return wpmoly_o( "enable-collection" );'), 'hide' => false, 'actions' => array(), 'scripts' => array(), 'styles' => array() ), 'genres' => array( 'page_title' => __( 'Genres', 'wpmovielibrary' ), 'menu_title' => __( 'Genres', 'wpmovielibrary' ), 'capability' => 'manage_categories', 'menu_slug' => 'edit-tags.php?taxonomy=genre&post_type=movie', 'function' => null, 'condition' => create_function('', 'return wpmoly_o( "enable-genre" );'), 'hide' => false, 'actions' => array(), 'scripts' => array(), 'styles' => array() ), 'actors' => array( 'page_title' => __( 'Actors', 'wpmovielibrary' ), 'menu_title' => __( 'Actors', 'wpmovielibrary' ), 'capability' => 'manage_categories', 'menu_slug' => 'edit-tags.php?taxonomy=actor&post_type=movie', 'function' => null, 'condition' => create_function('', 'return wpmoly_o( "enable-actor" );'), 'hide' => false, 'actions' => array(), 'scripts' => array(), 'styles' => array() ),
If these lines are simply cut, errors do not occur. And how to replace these functions with anonymous functions?
- The topic ‘create_function in WPMovieLibrary’ is closed to new replies.