wp_get_active_network_plugins [ WordPress Function ]
wp_get_active_network_plugins ( No parameters )
| Access: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_get_active_and_valid_plugins, wp_update_network_counts, wp_get_mu_plugins, deactivate_plugins, is_network_only_plugin
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, -4 ) // $plugin must end with '.php'
&& file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist
)
$plugins[] = WP_PLUGIN_DIR . '/' . $plugin;
}
return $plugins;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_get_active_network_plugins
Function and Method Cross Reference. wp_get_active_network_plugins(). Defined at: /wp-includes/ms-load.php -> line 28. Referenced 2 times: ...
phpxref.ftwr.co.uk - #19385 (wp_get_active_network_plugins() can generate a needless ...
In #18955, we stopped caching the default value when get_site_option() was called on an option that does not exist. This introduces a situation where ...
core.trac.wordpress.org - <?php // A set of unit tests for WordPress MultiSite /* To get the test ...
'/hello.php'), $active_plugins ); //deactivate the plugin deactivate_plugins($path); $active_plugins = wp_get_active_network_plugins(); $this->assertEquals( ...
gsoc.svn.wordpress.org - Code.JohnPBloch.com » TinyMCE Advanced as a Network ...
Dec 8, 2011 ... if( !is_multisite() || !in_array( WP_PLUGIN_DIR . '/tinymce-advanced/tinymce- advanced.php', wp_get_active_network_plugins() ) ) {. return;. } ...
code.johnpbloch.com