public static function get_alt_plugins_dirs($alt_heap = "")
{
$dirs = array();
if (!empty($alt_heap)) {
// return $alt_heap dir if defined
$dirs[] = WP_PLUGIN_DIR . self::get_alt_suffix($alt_heap);
// return false if no the alt heap dir doesn't exist
if (!file_exists($dirs[0])) {
return false;
}
} else {
// otherwise jsut return all alt plugin dirs
$iterator = new DirectoryIterator(dirname(WP_PLUGIN_DIR));
foreach ($iterator as $node) {
$basename = $node->getBasename();
if (0 === strpos($basename, basename(WP_PLUGIN_DIR) . '_tmp_')) {
$dirs[] = $node->getPathname();
}
}
}
return $dirs;
}