validate_plugin
validate_plugin ( $plugin )
Parameters:- (string) plugin Path to the plugin file relative to the plugins directory.
Returns:- (int|WP_Error) 0 on success, WP_Error on failure.
Defined at: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Validates the plugin path.Checks that the main plugin file exists and is a valid plugin. See validate_file().