Support » Plugin: WordPress Access Control » Fix for new WP version (4.5)

  • Hi everyone,

    If you are getting the following error messages:

    • Notice: The called constructor method for WP_Widget in WPAC_Nav_Menu_Widget is deprecated since version 4.3.0! Use __construct() instead. in D:\Hosting\bla\bla\bla\wp-includes\functions.php on line 3722
    • Notice: get_currentuserinfo is deprecated since version 4.5! Use wp_get_current_user() instead. in D:\Hosting\bla\bla\bla\wp-includes\functions.php on line 3662

    While we wait for a new version of the plugin, the solutions is very easy! You only need to make 2 changes to the code of the plugin.

    Note: Make sure you have a backup of your files and DB before making any changes.

    1. Widget file
    1. Open the file “default-widgets.php” that is located under the plugin’s folder (wordpress-access-control).
    2. Go to the line 30 of the file -OR- search for the word “WP_Widget” (without the quotes).
    3. Change the word “WP_Widget” for the word “__construct” (without the quotes).
    4. Save and upload the file.
    • WAC file
    1. Open the file “wordpress-access-control.php” that is located under the plugin’s folder (wordpress-access-control).
    2. Go to the line 257 of the file -OR- search for the word “get_currentuserinfo” (without the quotes).
    3. Change the word “get_currentuserinfo” for the word “wp_get_current_user” (without the quotes).
    4. Save and upload the file.

    I hope this helps someone out there.

    – Jorge Raigoza

    https://wordpress.org/plugins/wordpress-access-control/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fix for new WP version (4.5)’ is closed to new replies.