Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_get_mu_plugins [ WordPress Function ]

wp_get_mu_plugins ( No parameters )
Access:
  • private
Returns:
  • (array) Files to include
Defined at:



Returns array of must-use plugin files to be included in global scope.

The default directory is wp-content/mu-plugins. To change the default directory manually, define

WPMU_PLUGIN_DIR

and

WPMU_PLUGIN_URL

in wp-config.php.

Source


<?php
function wp_get_mu_plugins() {
    
$mu_plugins = array();
    if ( !
is_dirWPMU_PLUGIN_DIR ) )
        return 
$mu_plugins;
    if ( ! 
$dh opendirWPMU_PLUGIN_DIR ) )
        return 
$mu_plugins;
    while ( ( 
$plugin readdir$dh ) ) !== false ) {
        if ( 
substr$plugin, -) == '.php' )
            
$mu_plugins[] = WPMU_PLUGIN_DIR '/' $plugin;
    }
    
closedir$dh );
    
sort$mu_plugins );

    return 
$mu_plugins;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics