PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.8.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.8.0
2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 All 49 releases
← All changes | includes/abilities/content/class-get-term-seo.php +7 -1 1.26.02.8.0 View file →
@@ -9,8 +9,9 @@
9 9
10 10 namespace ThinkRank\Abilities\Content;
11 11
12 12 use ThinkRank\Abilities\Ability_Base;
13 +use ThinkRank\SEO\Object_Redirect;
13 14
14 15 if ( ! defined( 'ABSPATH' ) ) {
15 16 exit; // Exit if accessed directly.
16 17 }
@@ -24,9 +25,9 @@
24 25 */
25 26 public function __construct() {
26 27 $this->id = 'thinkrank/get-term-seo';
27 28 $this->label = __( 'Get ThinkRank Term SEO', 'thinkrank' );
28 - $this->description = __( 'Retrieve ThinkRank SEO metadata for a taxonomy term.', 'thinkrank' );
29 + $this->description = __( 'Retrieve ThinkRank SEO metadata for a taxonomy term. Use update-term-seo to change them, and get-term-seo-checks to see what would improve.', 'thinkrank' );
29 30 }
30 31
31 32 /**
32 33 * {@inheritDoc}
@@ -103,12 +104,17 @@
103 104 [ 'status' => 404 ]
104 105 );
105 106 }
106 107
108 + $redirect = Object_Redirect::get( 'term', $term_id );
109 +
107 110 $data = [
108 111 'title' => (string) get_term_meta( $term_id, '_thinkrank_seo_title', true ),
109 112 'description' => (string) get_term_meta( $term_id, '_thinkrank_meta_description', true ),
110 113 'canonical_url' => (string) get_term_meta( $term_id, '_thinkrank_canonical_url', true ),
114 + // Not term meta: the rule in Pro's redirections table is the value.
115 + 'redirect_url' => $redirect['url'],
116 + 'redirect_type' => $redirect['type'],
111 117 'focus_keyword' => (string) get_term_meta( $term_id, '_thinkrank_focus_keyword', true ),
112 118 'robots_meta_enabled' => get_term_meta( $term_id, '_thinkrank_robots_meta_enabled', true ),
113 119 'robots_meta' => $this->decode_json_field( get_term_meta( $term_id, '_thinkrank_robots_meta', true ) ),
114 120 'advanced_robots_meta' => $this->decode_json_field( get_term_meta( $term_id, '_thinkrank_advanced_robots_meta', true ) ),