On activation in Multisite: wp_get_sites is deprecated
-
Hi,
Activating Honeypot Toolkit in a Multisite environment results in a PHP Notice:
PHP Notice: wp_get_sites is <strong>deprecated</strong> since version 4.6.0! Use get_sites() instead. in /data/www/saotn.org/www/wp-includes/functions.php on line 3853
I fixed this for you, in two files:
honeypot-toolkit/lib/HoneypotToolkit.class.php
honeypot-toolkit/uninstall.php
Find line 546:
$networkSites = wp_get_sites();
and change that to:
$networkSites = get_sites();
Then on line 551:
switch_to_blog($site['blog_id']);
change that to:
switch_to_blog( $site->blog_id );
Do the same on lines 7 and 12 of uninstall.php
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘On activation in Multisite: wp_get_sites is deprecated’ is closed to new replies.