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/rest-api/stats/trait-post-data.php +2 -2 3.19.3 → 3.24.2 View file →
@@ -145,10 +145,10 @@
145 145 $site_id = $this->parsely->get_site_id();
146 146 $post_id = Utils::get_post_id_by_url( $item['url'] );
147 147 $post_url = Parsely::get_url_with_itm_source( $item['url'], null );
148 148
149 - // If we have a post ID, update the post canonical URL.
150 - if ( 0 !== $post_id ) {
149 + // Only updates the canonical URL of posts the current user can edit.
150 + if ( 0 !== $post_id && current_user_can( 'edit_post', $post_id ) ) {
151 151 Parsely::set_canonical_url( $post_id, $post_url );
152 152 }
153 153
154 154 if ( Utils::parsely_is_https_supported() ) {