lesterchan / wp-sweep

WP-Sweep allows you to clean up unused, orphaned and duplicated data in your WordPress. It also optimizes your database tables.
https://wordpress.org/plugins/wp-sweep/
152 stars 23 forks source link

Changed deprecated function wp_get_sites to get_sites #43

Closed diogogomeswww closed 8 years ago

diogogomeswww commented 8 years ago

@lesterchan small change: Changed deprecated function wp_get_sites to get_sites

lesterchan commented 8 years ago

Hmm get_sites is only in 4.6, this plugin supports 4.4 as well.

Not sure we should so something like this:

$ms_sites = function_exists( 'get_sites' ) ? get_sites() : wp_get_sites();

Then

$blog_id = isset( $ms_site['blog_id'] ) ? $ms_site['blog_id'] : $ms_site->blog_id;
diogogomeswww commented 8 years ago

@lesterchan yes, of course, forgot about that. Changed it using your proposal, hope that it helps

Cheers