json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php 1 location
|
@@ 85-87 (lines=3) @@
|
| 82 |
|
* @return bool|WP_Error |
| 83 |
|
*/ |
| 84 |
|
protected function validate_plugins() { |
| 85 |
|
if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) { |
| 86 |
|
return new WP_Error( 'missing_plugins', __( 'No plugins found.', 'jetpack' )); |
| 87 |
|
} |
| 88 |
|
foreach( $this->plugins as $index => $plugin ) { |
| 89 |
|
if ( ! preg_match( "/\.php$/", $plugin ) ) { |
| 90 |
|
$plugin = $plugin . '.php'; |
json-endpoints/jetpack/class.jetpack-json-api-plugins-install-endpoint.php 1 location
|
@@ 57-59 (lines=3) @@
|
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
protected function validate_plugins() { |
| 57 |
|
if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) { |
| 58 |
|
return new WP_Error( 'missing_plugins', __( 'No plugins found.', 'jetpack' ) ); |
| 59 |
|
} |
| 60 |
|
foreach( $this->plugins as $index => $slug ) { |
| 61 |
|
// make sure it is not already installed |
| 62 |
|
if ( self::get_plugin_id_by_slug( $slug ) ) { |
json-endpoints/jetpack/class.jetpack-json-api-themes-install-endpoint.php 1 location
|
@@ 78-80 (lines=3) @@
|
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
protected function validate_themes() { |
| 78 |
|
if ( empty( $this->themes ) || ! is_array( $this->themes ) ) { |
| 79 |
|
return new WP_Error( 'missing_themes', __( 'No themes found.', 'jetpack' ) ); |
| 80 |
|
} |
| 81 |
|
foreach( $this->themes as $index => $theme ) { |
| 82 |
|
|
| 83 |
|
if ( self::is_installed_theme( $theme ) ) { |