wpcli-vulnerability-scanner.php
/**
	 * Do WordPress core check
	 *
	 * @return void
	 */
Do WordPress core check
@return void
Do WordPress core check @return void
private function _do_wordpress() {
		$singular_type = 'wordpress';
		$plural_type   = 'wordpresses';
		$assoc_args = "assoc_args_{$singular_type}";
		$display     = $this->_check_wordpress();
		$update_list = $this->_extract_updatable_items( $display );
		$display_format = isset( $this->$assoc_args['format'] ) && ! empty( $this->$assoc_args['format'] ) ? $this->$assoc_args['format'] : 'table';
		$display        = $this->format_data_for_return( $display_format, $display );
		if ( ! $this->porcelain ) {
			$formatter = new \WP_CLI\Formatter( $this->$assoc_args, array(
				'name',
				'installed version',
				'status',
				'introduced in',
				'fix',
			), $plural_type );
			$formatter->display_items(
				$display,
				array(
					true,
					false,
					false,
					false,
					false,
				)
			);
			if ( 'ids' === $display_format ) {
				WP_CLI::log( '' );
			}
		} elseif ( $update_list ) {
			WP_CLI::log( implode( ' ', $update_list ) );
			die;
		}
	}
private function _do_wordpress ( ) { $ singular_type = 'wordpress' ; $ plural_type = 'wordpresses' ; $ assoc_args = " assoc_args_ { $ singular_type } " ; $ display = $ this -> _check_wordpress ( ) ; $ update_list = $ this -> _extract_updatable_items ( $ display ) ; $ display_format = isset ( $ this -> $ assoc_args [ 'format' ] ) && ! empty ( $ this -> $ assoc_args [ 'format' ] ) ? $ this -> $ assoc_args [ 'format' ] : 'table' ; $ display = $ this -> format_data_for_return ( $ display_format , $ display ) ; if ( ! $ this -> porcelain ) { $ formatter = new \ WP_CLI \ Formatter ( $ this -> $ assoc_args , array ( 'name' , 'installed version' , 'status' , 'introduced in' , 'fix' , ) , $ plural_type ) ; $ formatter -> display_items ( $ display , array ( true , false , false , false , false , ) ) ; if ( 'ids' === $ display_format ) { WP_CLI :: log ( '' ) ; } } elseif ( $ update_list ) { WP_CLI :: log ( implode ( ' ' , $ update_list ) ) ; die ; } }
Do WordPress core check
 @return void
Do WordPress core check @return void
// Pretty print // Add second array parameter to indicate the position of the column having a maybe colorized item. // Improve readeability: force new line.