Skip to content

Commit

Permalink
Fix nem sempre vem todos os campos no endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
elvishp2006 committed Nov 14, 2018
1 parent e8a7039 commit ca82548
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "apiki/wordpress-seo-rest",
"description": "Show in JSON REST params configured in yoast (meta-title, meta-description, facebook, twitter)",
"version": "1.2.4",
"version": "1.2.5",
"type": "wordpress-plugin",
"license": "GPL-2.0",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wordpress-seo-rest",
"version": "1.2.4",
"version": "1.2.5",
"description": "Show in JSON REST params configured in yoast (meta-title, meta-description, facebook, twitter)",
"main": "wordpress-seo-rest.php",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function add_custom_rest_fields()

public function get_rest_value( $object )
{
$model = new Term( $object, $this->options );
$model = new Term( (array) get_term( $object['id'] ), $this->options );

return array(
'open_graph' => $model->get_open_graph(),
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Term.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Term
public function __construct( $term, $options )
{
$this->options = $options;
$this->metas = $this->get_yoast_metas( $term['taxonomy'], $term['id'] );
$this->metas = $this->get_yoast_metas( $term['taxonomy'], $term['term_id'] );
$this->term = $term;
}

Expand Down
2 changes: 1 addition & 1 deletion wordpress-seo-rest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: WordPress SEO REST
Version: 1.2.4
Version: 1.2.5
Author: @kassyn
Author URI: https://github.com/kassyn
Text Domain: wordpress-seo-rest
Expand Down

0 comments on commit ca82548

Please sign in to comment.