validate_plugin_requirements ( $plugin )
- (string) plugin Path to the plugin file relative to the plugins directory.
Defined at:Change Log:
- (true|WP_Error) True if requirements are met, WP_Error on failure.
- Introduced in WordPress: 5.2.0
- Deprecated in WordPress: —
Validates the plugin requirements for WordPress version and PHP version.Uses the information from `Requires at least` and `Requires PHP` headers
defined in the plugin's main PHP file.
If the headers are not present in the plugin's main PHP file,
`readme.txt` is also checked as a fallback.