PHPCS: Fix WPCS violations in [44978].
See #43992. git-svn-id: https://develop.svn.wordpress.org/trunk@44979 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1586c43c8d
commit
0e1d2b42ef
@ -1096,19 +1096,31 @@ function validate_plugin_requirements( $plugin ) {
|
|||||||
$plugin_data = array_merge( $plugin_data, get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) );
|
$plugin_data = array_merge( $plugin_data, get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) );
|
||||||
|
|
||||||
if ( ! $plugin_data['wp_compatible'] && ! $plugin_data['php_compatible'] ) {
|
if ( ! $plugin_data['wp_compatible'] && ! $plugin_data['php_compatible'] ) {
|
||||||
return new WP_Error( 'plugin_wp_php_incompatible', sprintf(
|
return new WP_Error(
|
||||||
/* translators: %s: plugin name */
|
'plugin_wp_php_incompatible',
|
||||||
__( '<strong>Error:</strong> Current WordPress and PHP versions do not meet minimum requirements for %s.' ), $plugin_data['Name'] )
|
sprintf(
|
||||||
|
/* translators: %s: plugin name */
|
||||||
|
__( '<strong>Error:</strong> Current WordPress and PHP versions do not meet minimum requirements for %s.' ),
|
||||||
|
$plugin_data['Name']
|
||||||
|
)
|
||||||
);
|
);
|
||||||
} elseif ( ! $plugin_data['php_compatible'] ) {
|
} elseif ( ! $plugin_data['php_compatible'] ) {
|
||||||
return new WP_Error( 'plugin_php_incompatible', sprintf(
|
return new WP_Error(
|
||||||
/* translators: %s: plugin name */
|
'plugin_php_incompatible',
|
||||||
__( '<strong>Error:</strong> Current PHP version does not meet minimum requirements for %s.' ), $plugin_data['Name'] )
|
sprintf(
|
||||||
|
/* translators: %s: plugin name */
|
||||||
|
__( '<strong>Error:</strong> Current PHP version does not meet minimum requirements for %s.' ),
|
||||||
|
$plugin_data['Name']
|
||||||
|
)
|
||||||
);
|
);
|
||||||
} elseif ( ! $plugin_data['wp_compatible'] ) {
|
} elseif ( ! $plugin_data['wp_compatible'] ) {
|
||||||
return new WP_Error( 'plugin_wp_incompatible', sprintf(
|
return new WP_Error(
|
||||||
/* translators: %s: plugin name */
|
'plugin_wp_incompatible',
|
||||||
__( '<strong>Error:</strong> Current WordPress version does not meet minimum requirements for %s.' ), $plugin_data['Name'] )
|
sprintf(
|
||||||
|
/* translators: %s: plugin name */
|
||||||
|
__( '<strong>Error:</strong> Current WordPress version does not meet minimum requirements for %s.' ),
|
||||||
|
$plugin_data['Name']
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user