wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
wp_get_active_network_plugins is private and should not be used in themes or plugins directly.
wp_get_active_network_plugins › WordPress Function
Da3.1.0
Deprecaton/a
› wp_get_active_network_plugins ( Nessun parametro )
Accedi: |
|
Ritorna: |
|
Definito a: |
|
Codex: |
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, defineWP_PLUGIN_DIR
and WP_PLUGIN_URL
in wp-config.php
.Funzioni correlate: wp_get_active_and_valid_plugins, wp_update_network_counts, get_main_network_id, wp_get_network, wp_get_mu_plugins
Sorgenti
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. && str_ends_with( $plugin, '.php' ) // $plugin must end with '.php'. && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist. ) { $plugins[] = WP_PLUGIN_DIR . '/' . $plugin; } } return $plugins; }