Switch language

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




wp_get_active_network_plugins [ WordPress Function ]

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



Returns array of network plugin files to be included in global scope.

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

WP_PLUGIN_DIR

and

WP_PLUGIN_URL

in wp-config.php.

Source


<?php
function wp_get_active_network_plugins() {
    
$active_plugins = (array) get_site_option'active_sitewide_plugins', array() );
    if ( empty( 
$active_plugins ) )
        return array();

    
$plugins = array();
    
$active_plugins array_keys$active_plugins );
    
sort$active_plugins );

    foreach ( 
$active_plugins as $plugin ) {
        if ( ! 
validate_file$plugin // $plugin must validate as file
            
&& '.php' == substr$plugin, -// $plugin must end with '.php'
            
&& file_existsWP_PLUGIN_DIR '/' $plugin // $plugin must exist
            
)
        
$plugins[] = WP_PLUGIN_DIR '/' $plugin;
    }
    return 
$plugins;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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