Skip to content
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

send the permalink as canonicalUrl to Frost API fixes #11 #42

Merged
merged 3 commits into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ rules
screenshots
temp.text
vault.json
vendor
5 changes: 4 additions & 1 deletion public/partials/class-poet-consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function __construct( $author, $url, $token, $post ) {
* Get Author Name method
*
* Returns author name set in settings page or the name of the user who published the post
* @TODO support things like Co-Authors and/or other filters
*
* @return string
*/
Expand Down Expand Up @@ -92,11 +93,13 @@ public function consume() {
$tags = implode( ',', $tags_array );

$body_array = array(
'name' => $this->post->post_title,
'canonicalUrl' => get_permalink( $this->post->ID ),
'name' => get_the_title( $this->post->ID ),
'datePublished' => get_the_modified_time( 'c', $this->post ),
'dateCreated' => get_the_time( 'c', $this->post ),
'author' => $this->get_author_name(),
'tags' => $tags,
// @TODO maybe parse the shortcodes and other filters instead of sending the raw text
'content' => $this->post->post_content,
);

Expand Down