← All changes
|
includes/abilities/analysis/class-get-post-seo-checks.php
+40
-2
2.3.0
→
2.11.0
View file →
| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | */ |
| 29 | 29 | public function __construct() { |
| 30 | 30 | $this->id = 'thinkrank/get-post-seo-checks'; |
| 31 | 31 | $this->label = __( 'Get ThinkRank Post SEO Checks', 'thinkrank' ); |
| 32 | - $this->description = __( 'Run ThinkRank SEO score analysis for one or more posts, pages, or custom post type items. Scores are not persisted; use bulk-analyze-and-save to score and store them.', 'thinkrank' ); | |
| 32 | + $this->description = __( 'Run ThinkRank SEO score analysis for one or more posts, pages, or custom post type items. Each score includes keywords: for every focus keyword, whether it appears in the SEO title, meta description, URL slug, first paragraph, a subheading (H2-H6), the body, and an image alt text, with the heading or alt text that matched - use it to see which keyword is missing where. Scores are not persisted; use bulk-analyze-and-save to score and store them.', 'thinkrank' ); | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * {@inheritDoc} |
| @@ -79,9 +79,47 @@ | ||
| 79 | 79 | 'type' => 'object', |
| 80 | 80 | 'properties' => [ |
| 81 | 81 | 'status' => [ 'type' => 'string' ], |
| 82 | 82 | 'message' => [ 'type' => 'string' ], |
| 83 | - 'data' => [ 'type' => 'array' ], | |
| 83 | + 'data' => [ | |
| 84 | + 'type' => 'array', | |
| 85 | + 'items' => [ | |
| 86 | + 'type' => 'object', | |
| 87 | + 'properties' => [ | |
| 88 | + 'post_id' => [ 'type' => 'integer' ], | |
| 89 | + 'error' => [ 'type' => 'string' ], | |
| 90 | + 'score' => [ | |
| 91 | + 'type' => 'object', | |
| 92 | + 'properties' => [ | |
| 93 | + 'overall_score' => [ 'type' => 'integer' ], | |
| 94 | + 'grade' => [ 'type' => 'string' ], | |
| 95 | + 'keywords' => [ | |
| 96 | + 'type' => 'array', | |
| 97 | + 'items' => [ | |
| 98 | + 'type' => 'object', | |
| 99 | + 'properties' => [ | |
| 100 | + 'keyword' => [ 'type' => 'string' ], | |
| 101 | + 'passed' => [ | |
| 102 | + 'type' => 'integer', | |
| 103 | + 'description' => __( 'Placements the keyword appears in.', 'thinkrank' ), | |
| 104 | + ], | |
| 105 | + 'total' => [ 'type' => 'integer' ], | |
| 106 | + 'placements' => [ | |
| 107 | + 'type' => 'object', | |
| 108 | + 'description' => sprintf( | |
| 109 | + /* translators: %s: comma-separated placement names. */ | |
| 110 | + __( 'One entry per placement (%s), each {passed, where}; where is the matching heading or alt text.', 'thinkrank' ), | |
| 111 | + implode( ', ', SEOScoreCalculator::PLACEMENTS ) | |
| 112 | + ), | |
| 113 | + ], | |
| 114 | + ], | |
| 115 | + ], | |
| 116 | + ], | |
| 117 | + ], | |
| 118 | + ], | |
| 119 | + ], | |
| 120 | + ], | |
| 121 | + ], | |
| 84 | 122 | ], |
| 85 | 123 | ]; |
| 86 | 124 | } |
| 87 | 125 | |