wp_get_active_and_valid_plugins [ WordPress Function ]
wp_get_active_and_valid_plugins ( No parameters )
| Access: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_get_active_network_plugins, wp_get_mu_plugins, deactivate_plugins, deactivate_sitewide_plugin, wp_get_cookie_login
Returns array of 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_and_valid_plugins() {
$plugins = array();
$active_plugins = (array) get_option( 'active_plugins', array() );
// Check for hacks file if the option is enabled
if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) {
_deprecated_file( 'my-hacks.php', '1.5' );
array_unshift( $plugins, ABSPATH . 'my-hacks.php' );
}
if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) )
return $plugins;
$network_plugins = is_multisite() ? wp_get_active_network_plugins() : false;
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
// not already included as a network plugin
&& ( ! $network_plugins || ! in_array( WP_PLUGIN_DIR . '/' . $plugin, $network_plugins ) )
)
$plugins[] = WP_PLUGIN_DIR . '/' . $plugin;
}
return $plugins;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- wp_get_active_and_valid_plugins
Function and Method Cross Reference. wp_get_active_and_valid_plugins(). Defined at: /wp-includes/load.php -> line 468. Referenced 1 times: /wp-settings. php ...
phpxref.ftwr.co.uk - wp_get_active_and_valid_plugins() WordPress function reference ...
Returns array of plugin files to be included in global scope.
queryposts.com - wp_get_active_and_valid_plugins - Function Reference - PHP ...
Jun 1, 2011 ... Function and Method Cross Reference. wp_get_active_and_valid_plugins(). Defined at: /wp-includes/load.php -> line 461. Referenced 1 times: ...
xref.yoast.com - Where can I find a schema of wordpress plugin core architecture ...
Mar 20, 2011 ... Among other things this files calls wp_get_active_and_valid_plugins() function, that gets list of activated (through admin interface) plugins from ...
wordpress.stackexchange.com