get_from_img_tags( $text ); if ( $this->can_parse_blocks( $text ) ) { $blocks = parse_blocks( $text ); $images = array_merge( $images, $this->get_from_css_background_images_in_blocks( $blocks ) ); } else { $images = array_merge( $images, $this->get_from_css_background_images( $text ) ); } return $images; } /** * @param string $text * * @return array */ private function get_from_img_tags( $text ) { $media = wpml_collect( [] ); $media_elements = [ '/]+)>/s', '/