protected function set_readme_info( $readme ) {
		foreach ( (array) $this->type->sections as $section => $value ) {
			if ( 'description' === $section ) {
				continue;
			}
			$readme['sections'][ $section ] = $value;
		}

		$readme['remaining_content'] = ! empty( $readme['remaining_content'] ) ? $readme['remaining_content'] : null;
		if ( empty( $readme['sections']['other_notes'] ) ) {
			unset( $readme['sections']['other_notes'] );
		} else {
			$readme['sections']['other_notes'] .= $readme['remaining_content'];
		}
		unset( $readme['sections']['screenshots'], $readme['sections']['installation'] );
		$readme['sections']       = ! empty( $readme['sections'] ) ? $readme['sections'] : [];
		$this->type->sections     = array_merge( (array) $this->type->sections, (array) $readme['sections'] );
		$this->type->tested       = isset( $readme['tested'] ) ? $readme['tested'] : null;
		$this->type->requires     = isset( $readme['requires'] ) ? $readme['requires'] : null;
		$this->type->requires_php = isset( $readme['requires_php'] ) ? $readme['requires_php'] : null;
		$this->type->donate_link  = isset( $readme['donate_link'] ) ? $readme['donate_link'] : null;
		$this->type->contributors = isset( $readme['contributors'] ) ? $readme['contributors'] : null;

		return true;
	}
protected function set_readme_info( $readme ) {
		foreach ( (array) $this->type->sections as $section => $value ) {
			if ( 'description' === $section ) {
				continue;
			}
			$readme['sections'][ $section ] = $value;
		}

		$readme['remaining_content'] = ! empty( $readme['remaining_content'] ) ? $readme['remaining_content'] : null;
		if ( empty( $readme['sections']['other_notes'] ) ) {
			unset( $readme['sections']['other_notes'] );
		} else {
			$readme['sections']['other_notes'] .= $readme['remaining_content'];
		}
		unset( $readme['sections']['screenshots'], $readme['sections']['installation'] );
		$readme['sections']       = ! empty( $readme['sections'] ) ? $readme['sections'] : [];
		$this->type->sections     = array_merge( (array) $this->type->sections, (array) $readme['sections'] );
		$this->type->tested       = isset( $readme['tested'] ) ? $readme['tested'] : null;
		$this->type->requires     = isset( $readme['requires'] ) ? $readme['requires'] : null;
		$this->type->requires_php = isset( $readme['requires_php'] ) ? $readme['requires_php'] : null;
		$this->type->donate_link  = isset( $readme['donate_link'] ) ? $readme['donate_link'] : null;
		$this->type->contributors = isset( $readme['contributors'] ) ? $readme['contributors'] : null;

		return true;
	}
protected function set_readme_info ( $ readme ) { foreach ( ( array ) $ this -> type -> sections as $ section => $ value ) { if ( 'description' === $ section ) { continue ; } $ readme [ 'sections' ] [ $ section ] = $ value ; } $ readme [ 'remaining_content' ] = ! empty ( $ readme [ 'remaining_content' ] ) ? $ readme [ 'remaining_content' ] : null ; if ( empty ( $ readme [ 'sections' ] [ 'other_notes' ] ) ) { unset ( $ readme [ 'sections' ] [ 'other_notes' ] ) ; } else { $ readme [ 'sections' ] [ 'other_notes' ] .= $ readme [ 'remaining_content' ] ; } unset ( $ readme [ 'sections' ] [ 'screenshots' ] , $ readme [ 'sections' ] [ 'installation' ] ) ; $ readme [ 'sections' ] = ! empty ( $ readme [ 'sections' ] ) ? $ readme [ 'sections' ] : [ ] ; $ this -> type -> sections = array_merge ( ( array ) $ this -> type -> sections , ( array ) $ readme [ 'sections' ] ) ; $ this -> type -> tested = isset ( $ readme [ 'tested' ] ) ? $ readme [ 'tested' ] : null ; $ this -> type -> requires = isset ( $ readme [ 'requires' ] ) ? $ readme [ 'requires' ] : null ; $ this -> type -> requires_php = isset ( $ readme [ 'requires_php' ] ) ? $ readme [ 'requires_php' ] : null ; $ this -> type -> donate_link = isset ( $ readme [ 'donate_link' ] ) ? $ readme [ 'donate_link' ] : null ; $ this -> type -> contributors = isset ( $ readme [ 'contributors' ] ) ? $ readme [ 'contributors' ] : null ; return true ; }
Set data from readme.txt.
Prefer changelog from CHANGES.md.

@param array $readme Array of parsed readme.txt data.

@return bool
Set data from readme . txt . Prefer changelog from CHANGES . md .