User role editor WP 4.0 fail
-
Just after update the plugin user role editor, my wordpress site was down with a beautiful php error.
It seems that in file ” wp-content/plugins/user-role-editor/includes/class-ure-lib.php “
at line 72, the function is_plugin_active_for_network is called.
But ! In the WP codex, it’s explain that this function is provide by the file ” /wp-admin/includes/plugin.php “.
And after taking a look, it seems that the dev forgot to include that file…I just add
” require_once( ABSPATH . ‘/wp-admin/includes/plugin.php’ ); “
befor the call and everything work again.Trace of the chage :
BEFORE :
protected function init_options($options_id) {global $wpdb;
if ($this->multisite) {
$this->active_for_network = is_plugin_active_for_network(URE_PLUGIN_BASE_NAME);
}AFTER :
protected function init_options($options_id) {
global $wpdb;
if ($this->multisite) {
require_once( ABSPATH . ‘/wp-admin/includes/plugin.php’ );
$this->active_for_network = is_plugin_active_for_network(URE_PLUGIN_BASE_NAME);
}Good luck for you !
- The topic ‘User role editor WP 4.0 fail’ is closed to new replies.