PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
← All changes | src/Endpoints/class-rest-metadata.php +3 -16 3.20.1 → 3.24.2 View file →
@@ -11,11 +11,8 @@
11 11 namespace Parsely\Endpoints;
12 12
13 13 use Parsely\Metadata;
14 14 use WP_Post;
15 -use Parsely\Models\Smart_Link;
16 -use Parsely\Models\Smart_Link_Status;
17 -use Parsely\Models\Inbound_Smart_Link;
18 15
19 16 /**
20 17 * Injects Parse.ly Metadata to WordPress REST API.
21 18 *
@@ -63,8 +60,9 @@
63 60 * REST API field. It generates the `parsely` object in the REST API.
64 61 *
65 62 * @since 3.1.0
66 63 * @since 3.19.0 Added the `canonical_url` field.
64 + * @since 3.24.2 Removed the `smart_links` and `traffic_boost_suggestions_count` fields.
67 65 *
68 66 * @param array<string, mixed> $object_data The data of the object to render the metadata for,
69 67 * usually a post or a page.
70 68 * @return array<string, mixed> The `parsely` object to be rendered in the REST API. Contains a
@@ -78,15 +76,10 @@
78 76
79 77 $options = $this->parsely->get_options();
80 78
81 79 $response = array(
82 - 'version' => self::REST_VERSION,
83 - 'canonical_url' => \Parsely\Parsely::get_canonical_url_from_post( $post_id ),
84 - 'smart_links' => array(
85 - 'inbound' => 0,
86 - 'outbound' => 0,
87 - ),
88 - 'traffic_boost_suggestions_count' => 0,
80 + 'version' => self::REST_VERSION,
81 + 'canonical_url' => \Parsely\Parsely::get_canonical_url_from_post( $post_id ),
89 82 );
90 83
91 84 if ( false === $post ) {
92 85 return $response;
@@ -118,14 +111,8 @@
118 111 */
119 112 if ( apply_filters( 'wp_parsely_enable_tracker_url', true, $post ) ) {
120 113 $response['tracker_url'] = $this->parsely->get_tracker_url();
121 114 }
122 -
123 - // Fetch Smart Link data.
124 - $response['smart_links'] = Smart_Link::get_link_counts( $post_id, Smart_Link_Status::APPLIED );
125 -
126 - // Fetch Traffic Boost data.
127 - $response['traffic_boost_suggestions_count'] = Inbound_Smart_Link::get_suggestions_count( $post_id );
128 115
129 116 return $response;
130 117 }
131 118 }