File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
plugins/image-prioritizer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ static function ( $host ) {
264
264
}
265
265
266
266
/**
267
- * Filters the response before executing any REST API callbacks .
267
+ * Sanitizes the lcpElementExternalBackgroundImage property from the request URL Metric storage request .
268
268
*
269
269
* This removes the lcpElementExternalBackgroundImage from the URL Metric prior to it being stored if the background
270
270
* image URL is not valid. Removal of the property is preferable to invalidating the entire URL Metric because then
@@ -288,8 +288,8 @@ function image_prioritizer_filter_rest_request_before_callbacks( $response, arra
288
288
if (
289
289
$ request ->get_method () !== 'POST '
290
290
||
291
- // The strtolower() is due to \WP_REST_Server::match_request_to_handler() using case-insensitive pattern match.
292
- OD_REST_API_NAMESPACE . OD_URL_METRICS_ROUTE !== strtolower ( trim ( $ request ->get_route (), '/ ' ) )
291
+ // The strtolower() is due to \WP_REST_Server::match_request_to_handler() using case-insensitive pattern match.
292
+ OD_REST_API_NAMESPACE . OD_URL_METRICS_ROUTE !== trim ( strtolower ( trim ( $ request ->get_route (), '/ ' ) ) )
293
293
) {
294
294
return $ response ;
295
295
}
You can’t perform that action at this time.
0 commit comments