get_post_data( $post_id ); if ( empty( $post_data ) ) { return array( '@type' => $this->type ); } $schema = array( '@type' => $this->type, '@id' => Schema_AI_ID_Builder::webpage( $post_id ), 'url' => $post_data['url'], 'name' => $post_data['title'], 'description' => $post_data['excerpt'], 'inLanguage' => get_bloginfo( 'language' ), 'datePublished' => $post_data['date'], 'dateModified' => $post_data['modified'], 'isPartOf' => $this->get_website_reference(), 'publisher' => $this->get_publisher_reference(), 'about' => $this->get_publisher_reference(), ); $image = $this->get_image_data( $post_id ); if ( ! empty( $image ) ) { $schema['primaryImageOfPage'] = $image; } $schema = $this->merge_fields( $schema, $fields, array( 'name', 'description', 'inLanguage', ) ); return $schema; } }