[ * 's-folder1' => [ * file1 => [], * file2 => [], * ], * 's-folder2' => [], * file1 => [] * ] * ] * * @return array */ public static function getCorePathsList() { if (is_null(self::$corePathList)) { require_once(dirname(__FILE__).'/wordpress.core.files.php'); } return self::$corePathList; } /** * return object list of sites * * @return boolean */ public static function getSites($args = array()) { if (!function_exists('is_multisite') || !is_multisite()) { return false; } if (function_exists('get_sites')) { return get_sites($args); } else { $result = array(); $blogs = wp_get_sites($args); foreach ($blogs as $blog) { $result[] = (object) $blog; } return $result; } } } }