WPDev.one
Core Function
View Source on Trac ↗

validate_plugin()

validate_plugin( mixed $plugin )

Validates the plugin path.

Parameters 1 required

Name / Type Description
$plugin
string

Path to the plugin file relative to the plugins directory.

Required

Return Value

((int)
| WP_Error) 0 on success, WP_Error on failure.

Function Information

Since Version
2.5.0
Source File
wp-admin/includes/plugin.php
Advertisement