wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_get_mu_plugins is private and should not be used in themes or plugins directly.
wp_get_mu_plugins › WordPress Function
Seit3.0.0
Veraltetn/v
› wp_get_mu_plugins ( Keine Parameter )
| Zugriff: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Retrieves an array of must-use plugin files.
The default directory is wp-content/mu-plugins. To change the default directory manually, defineWPMU_PLUGIN_DIR and WPMU_PLUGIN_URL
in wp-config.php.Ähnliche Funktionen: get_mu_plugins, get_plugins, wp_get_links, wp_get_plugin_error, wp_update_plugins
Quellcode
function wp_get_mu_plugins() {
$mu_plugins = array();
if ( ! is_dir( WPMU_PLUGIN_DIR ) ) {
return $mu_plugins;
}
$dh = opendir( WPMU_PLUGIN_DIR );
if ( ! $dh ) {
return $mu_plugins;
}
while ( ( $plugin = readdir( $dh ) ) !== false ) {
if ( str_ends_with( $plugin, '.php' ) ) {
$mu_plugins[] = WPMU_PLUGIN_DIR . '/' . $plugin;
}
}
closedir( $dh );
sort( $mu_plugins );
return $mu_plugins;
}