public static function get_post_field( $post_id = 0, $include_wp_fields = true, $field = '' ) {
		if ( $include_wp_fields && ! $field ) {
			$wp_fields = [
				'post_id' => $post_id,
				'permalink' => get_permalink( $post_id ),
				'title' => get_the_title( $post_id ),
				'content' => apply_filters( 'the_content', get_post_field( 'post_content', $post_id ) ),
			];
			return array_merge( $wp_fields, self::get_field( $post_id ) );
		}
		return self::get_field( $post_id, $field );
	}
public static function get_post_field( $post_id = 0, $include_wp_fields = true, $field = '' ) {
		if ( $include_wp_fields && ! $field ) {
			$wp_fields = [
				'post_id' => $post_id,
				'permalink' => get_permalink( $post_id ),
				'title' => get_the_title( $post_id ),
				'content' => apply_filters( 'the_content', get_post_field( 'post_content', $post_id ) ),
			];
			return array_merge( $wp_fields, self::get_field( $post_id ) );
		}
		return self::get_field( $post_id, $field );
	}
public static function get_post_field ( $ post_id = 0 , $ include_wp_fields = true , $ field = '' ) { if ( $ include_wp_fields && ! $ field ) { $ wp_fields = [ 'post_id' => $ post_id , 'permalink' => get_permalink ( $ post_id ) , 'title' => get_the_title ( $ post_id ) , 'content' => apply_filters ( 'the_content' , get_post_field ( 'post_content' , $ post_id ) ) , ] ; return array_merge ( $ wp_fields , self :: get_field ( $ post_id ) ) ; } return self :: get_field ( $ post_id , $ field ) ; }
Get the field value for a post.

@param int $post_id The target post's id. Or leave blank for he current post if in the loop.
@param bool $include_wp_fields Whether or not to include the default WP fields.
@param string $field The ACF field id or name. Return all fields if blank.
@return array
Get the field value for a post .