validate_plugin [ WordPress Function ]
validate_plugin ( $plugin )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: activate_plugin, validate_active_plugins, activate_plugins, validate_blog_signup, validate_file
Validate the plugin path.
Checks that the file exists and {@link validate_file() is valid file}.
Source
<?php
function validate_plugin($plugin) {
if ( validate_file($plugin) )
return new WP_Error('plugin_invalid', __('Invalid plugin path.'));
if ( ! file_exists(WP_PLUGIN_DIR . '/' . $plugin) )
return new WP_Error('plugin_not_found', __('Plugin file does not exist.'));
$installed_plugins = get_plugins();
if ( ! isset($installed_plugins[$plugin]) )
return new WP_Error('no_plugin_header', __('The plugin does not have a valid header.'));
return 0;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- bassistance.de » jQuery plugin: Validation
but when plugin validates my form and display error message in black colour. What's wrong? It's possible to insert style inside validate plugin? Cheers. andrew ...
bassistance.de - Plugins/Validation - jQuery JavaScript Library
Validate forms like you've never been validating before! "But doesn't jQuery make it so very easy to write your own validation plugin?" Sure, but there still are a ...
docs.jquery.com - validate_plugin() WordPress function reference, arguments and ...
Validate the plugin path. Checks that the file exists and {@link validate_file() is valid file}. Signature. validate_plugin( $plugin ). plugin: (string) Plugin Path ...
queryposts.com - #15906 (validate_plugin needs all_plugins filter) – WordPress Trac
If a plugin adds plugins to the plugin list in the plugin admin screens using the all_plugins filter, the added plugins will not validate. If the all_plugins filter is ...
core.trac.wordpress.org