Skip to content

Commit

Permalink
send the permalink as canonicalUrl to Frost API (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
markparolisi authored and lautarodragan committed Nov 27, 2018
1 parent 104162e commit ecd4e28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ rules
screenshots
temp.text
vault.json
vendor
vendor/
*.zip
build

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

0 comments on commit ecd4e28

Please sign in to comment.