| @@ -19,9 +19,9 @@ | ||
| 19 | 19 | // to provide backwards compatibility for the Gallery Block, |
| 20 | 20 | // which now wraps Image Blocks within innerBlocks. |
| 21 | 21 | // The data-id attribute is added in a core/gallery `render_block_data` hook. |
| 22 | 22 | $data_id_attribute = 'data-id="' . esc_attr( $attributes['data-id'] ) . '"'; |
| 23 | - if ( false === strpos( $content, $data_id_attribute ) ) { | |
| 23 | + if ( ! str_contains( $content, $data_id_attribute ) ) { | |
| 24 | 24 | $content = str_replace( '<img', '<img ' . $data_id_attribute . ' ', $content ); |
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | return $content; |