*/ public function summary(WP_Post $post): array { return [ 'id' => (int) $post->ID, 'type' => (string) $post->post_type, 'status' => (string) $post->post_status, 'title' => (string) $post->post_title, 'slug' => (string) $post->post_name, 'parent' => (int) $post->post_parent, 'date' => (string) $post->post_date, 'modified' => (string) $post->post_modified, 'url' => (string) get_permalink($post), 'edit_url' => (string) get_edit_post_link($post->ID, 'raw'), 'divi' => self::usesDivi($post), ]; } /** @return array */ public function full(WP_Post $post): array { $divi = self::usesDivi($post); return array_merge($this->summary($post), [ 'excerpt' => (string) $post->post_excerpt, 'content' => $divi ? null : (string) $post->post_content, 'menu_order' => (int) $post->menu_order, 'author' => [ 'id' => (int) $post->post_author, 'name' => (string) get_the_author_meta('display_name', (int) $post->post_author), ], 'template' => (string) get_page_template_slug($post), 'preview_url' => (string) get_preview_post_link($post), 'terms' => JsonMap::of($this->terms($post)), 'fields' => JsonMap::of($this->fields($post)), 'featured_image' => $this->featuredImage($post), 'rev' => Rev::ofPost($post), 'hints' => $divi ? [self::diviHint()] : [], ]); } public static function usesDivi(WP_Post $post): bool { return DiviPages::usesBuilder((int) $post->ID) || str_contains((string) $post->post_content, '