Skip to content

Commit 1f00f57

Browse files
committed
fix format
1 parent 7744c6e commit 1f00f57

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

inc/lazyload_replacer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,21 +531,21 @@ public function get_svg_for( $width, $height, $url = null ) {
531531
list( $width, $height ) = $sizes;
532532
}
533533
// If the width is not found the url might be an offloaded attachment so we can get the width and height from the metadata.
534-
if( ! is_numeric( $width ) ) {
534+
if ( ! is_numeric( $width ) ) {
535535
$attachment_id = $this->attachment_url_to_post_id( $url );
536536
$meta = wp_get_attachment_metadata( $attachment_id );
537537
$width = $meta['width'] ?? false;
538538
$height = $meta['height'] ?? false;
539539
}
540-
540+
541541
$width = ! is_numeric( $width ) ? '100%' : $width;
542542
$height = ! is_numeric( $height ) ? '100%' : $height;
543543
$fill = $this->settings->get( 'placeholder_color' );
544544

545545
if ( empty( $fill ) ) {
546546
$fill = 'transparent';
547547
}
548-
548+
549549
return str_replace(
550550
[ '#width#', '#height#', '#fill#' ],
551551
[

inc/rest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ public function optimizations( WP_REST_Request $request ) {
954954
if ( empty( $device_type ) || empty( $url ) || ! is_array( $above_fold_images ) ) {
955955
return $this->response( 'Missing required parameters', 'error' );
956956
}
957-
//save just the first 6 images, see https://github.com/Codeinwp/optimole-service/issues/1588#issuecomment-3357110865
957+
// save just the first 6 images, see https://github.com/Codeinwp/optimole-service/issues/1588#issuecomment-3357110865
958958
$above_fold_images = array_slice( $above_fold_images, 0, 6 );
959959
if ( count( $bg_selectors ) > 100 ) {
960960
return $this->response( 'Background selectors limit exceeded', 'error' );

0 commit comments

Comments
 (0)