-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional fields to be sent #116
Conversation
includes/functions/content-sync.php
Outdated
@@ -180,29 +180,44 @@ function get_post_data( $post ) { | |||
$content = apply_filters( 'the_content', get_the_content( null, false, $post ) ); | |||
$content = str_replace( ']]>', ']]>', $content ); | |||
$canonical_url = wp_get_canonical_url( $post ); | |||
$keywords = ''; | |||
|
|||
// Support Yoast SEO canonical URL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should update the comment to mention keywords.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated @dinhtungdu
'thumbnailImageUri' => get_the_post_thumbnail_url( $post, 'full' ), | ||
'embeddedImagesCount' => Utils\get_number_of_embedded_images( $content ), | ||
'classificationCode' => '', | ||
'collectionName' => '', | ||
'isSponsored' => false, | ||
'promoPlainText' => '', | ||
'keywords' => $keywords, | ||
'creditLine' => '', | ||
'ownership' => '', | ||
'editorialAccessName' => '', | ||
'subtype' => '', | ||
'redirectToUrl' => '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we filter the falsy items below, so most of this will be removed. Please see #62 (comment) for more info about omitting empty keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dinhtungdu
I saw that. I've added the fields even with an empty string to keep track since these fields will be addressed in the future.
Description of the Change
This change adds new fields about the post to be sent.
Alternate Designs
Benefits
Possible Drawbacks
Verification Process
Checklist:
Applicable Issues
Changelog Entry
Added new fields to be sent to the API: thumbnailImageUri, embeddedImagesCount, and keywords.