json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 84-86 (lines=3) @@ | 
                                                            
                                    | 81 |  | 	 * @return bool|WP_Error | 
                                                            
                                    | 82 |  | 	 */ | 
                                                            
                                    | 83 |  | 	protected function validate_plugins() { | 
                                                            
                                    | 84 |  | 		if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) { | 
                                                            
                                    | 85 |  | 			return new WP_Error( 'missing_plugins', __( 'No plugins found.', 'jetpack' )); | 
                                                            
                                    | 86 |  | 		} | 
                                                            
                                    | 87 |  | 		foreach( $this->plugins as $index => $plugin ) { | 
                                                            
                                    | 88 |  | 			if ( ! preg_match( "/\.php$/", $plugin ) ) { | 
                                                            
                                    | 89 |  | 				$plugin =  $plugin . '.php'; | 
                                                                        
                 
                                                            
                    
json-endpoints/jetpack/class.jetpack-json-api-plugins-install-endpoint.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 51-53 (lines=3) @@ | 
                                                            
                                    | 48 |  | 	} | 
                                                            
                                    | 49 |  |  | 
                                                            
                                    | 50 |  | 	protected function validate_plugins() { | 
                                                            
                                    | 51 |  | 		if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) { | 
                                                            
                                    | 52 |  | 			return new WP_Error( 'missing_plugins', __( 'No plugins found.', 'jetpack' ) ); | 
                                                            
                                    | 53 |  | 		} | 
                                                            
                                    | 54 |  | 		foreach( $this->plugins as $index => $slug ) { | 
                                                            
                                    | 55 |  |  | 
                                                            
                                    | 56 |  | 			// make sure it is not already installed | 
                                                                        
                 
                                                            
                    
json-endpoints/jetpack/class.jetpack-json-api-themes-install-endpoint.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 47-49 (lines=3) @@ | 
                                                            
                                    | 44 |  | 	} | 
                                                            
                                    | 45 |  |  | 
                                                            
                                    | 46 |  | 	protected function validate_themes() { | 
                                                            
                                    | 47 |  | 		if ( empty( $this->themes ) || ! is_array( $this->themes ) ) { | 
                                                            
                                    | 48 |  | 			return new WP_Error( 'missing_themes', __( 'No themes found.', 'jetpack' ) ); | 
                                                            
                                    | 49 |  | 		} | 
                                                            
                                    | 50 |  | 		foreach( $this->themes as $index => $theme ) { | 
                                                            
                                    | 51 |  |  | 
                                                            
                                    | 52 |  | 			if ( self::is_installed_theme( $theme ) ) { |