Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/block-library/src/image/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @return string The block content with the data-id attribute added.
*/
function render_block_core_image( $attributes, $content, $block ) {
if ( false === stripos( $content, '<img' ) ) {
if ( ! str_contains( $content, '<img' ) ) {
return '';
}

Expand Down Expand Up @@ -132,7 +132,7 @@ function block_core_image_render_lightbox( $block_content, $block ) {
* block content as-is. It may be that there's no actual image in the block
* or it could be that another plugin already modified this HTML.
*/
if ( false === stripos( $block_content, '<img' ) ) {
if ( ! str_contains( $block_content, '<img' ) ) {
return $block_content;
}

Expand Down