From 775b126653560911dccdbd1e34a4a635962bd2d1 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 21 Oct 2018 17:09:11 -0400 Subject: [PATCH] Use the post title as the summary and the excerpt as the content --- includes/client/posts.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/client/posts.php b/includes/client/posts.php index 5d6939b..c80b38d 100644 --- a/includes/client/posts.php +++ b/includes/client/posts.php @@ -52,6 +52,7 @@ function post_to_object( $post ) { ENT_QUOTES, 'UTF-8' ); + $summary = $summary . '

' . $permalink; } $matches = array(); if ( preg_match( '/(.+)__trashed\/$/', $permalink, $matches ) ) { @@ -61,12 +62,12 @@ function post_to_object( $post ) { '@context' => array( 'https://www.w3.org/ns/activitystreams' ), 'type' => 'Article', 'name' => $post->post_title, - 'content' => $post->post_content, + 'content' => $summary, 'attributedTo' => get_rest_url( null, sprintf( '/pterotype/v1/actor/%s', PTEROTYPE_BLOG_ACTOR_SLUG ) ), 'url' => $permalink, - 'summary' => $summary, + 'summary' => $post->post_title, ); $existing = get_existing_object( $permalink ); if ( $existing ) {