Title: WordPress Multisite below 3.7
Last modified: August 21, 2016

---

# WordPress Multisite below 3.7

 *  Resolved [hiphopsmurf](https://wordpress.org/support/users/hiphopsmurf/)
 * (@hiphopsmurf)
 * [12 years ago](https://wordpress.org/support/topic/wordpress-multisite-below-37/)
 * The function `wp_get_sites()` is not present in WordPress versions below 3.7 
   so I made a modification to the function `get_blogs()` in /wp-content/plugins/
   wp-security-audit-log/inc/WPPHUtil.php @ Line 219.
 * Changed:
 *     ```
       static function get_blogs()
           {
               if(wp_is_large_network()){
                   return get_blog_details(get_option(WPPH_MAIN_SITE_ID_OPTION_NAME),true);
               }
               $blogs = wp_get_sites();
               $out = array();
               foreach($blogs as $blog){
                   $entry = get_blog_details($blog['blog_id']);
                   array_push($out, array(
                       'blog_id' => $entry->blog_id,
                       'blogname' => $entry->blogname
                   ));
               }
               array_unshift($out, array('blog_id' => 0, 'blogname' => 'All sites'));
               return $out;
           }
       ```
   
 * TO:
 *     ```
       static function get_blogs()
           {
       		global $wpdb;
               if(wp_is_large_network()){
                   return get_blog_details(get_option(WPPH_MAIN_SITE_ID_OPTION_NAME),true);
               }
               //$blogs = wp_get_sites();
       		$query = 'SELECT blog_id FROM ' . $wpdb->blogs;
       		$blogs = $wpdb->get_results($query);
               $out = array();
               foreach($blogs as $blog){
                   //$entry = get_blog_details($blog['blog_id']);
       			$entry = get_blog_details($blog->blog_id);
                   array_push($out, array(
                       'blog_id' => $entry->blog_id,
                       'blogname' => $entry->blogname
                   ));
               }
               array_unshift($out, array('blog_id' => 0, 'blogname' => 'All sites'));
               return $out;
           }
       ```
   
 * It would be useful to see this in a future update :O)
 * [https://wordpress.org/plugins/wp-security-audit-log/](https://wordpress.org/plugins/wp-security-audit-log/)

Viewing 1 replies (of 1 total)

 *  [WPWhiteSecurity](https://wordpress.org/support/users/wpwhitesecurity/)
 * (@wpwhitesecurity)
 * [12 years ago](https://wordpress.org/support/topic/wordpress-multisite-below-37/#post-4972298)
 * Hi,
 * Thanks for the recommendation and for using our plugin. We will look into your
   solution and definitely consider adding it to the next update.

Viewing 1 replies (of 1 total)

The topic ‘WordPress Multisite below 3.7’ is closed to new replies.

 * ![](https://ps.w.org/wp-security-audit-log/assets/icon-256x256.png?rev=2961534)
 * [WP Activity Log](https://wordpress.org/plugins/wp-security-audit-log/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-security-audit-log/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-security-audit-log/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-security-audit-log/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-security-audit-log/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-security-audit-log/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WPWhiteSecurity](https://wordpress.org/support/users/wpwhitesecurity/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/wordpress-multisite-below-37/#post-4972298)
 * Status: resolved