Plugin Directory

Changeset 2309501


Ignore:
Timestamp:
05/21/2020 01:42:58 PM (6 years ago)
Author:
rom4i
Message:

version 1.1.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sarvarov-lazy-load/trunk/public/class-sarvarov-lazy-load-public.php

    r2309154 r2309501  
    188188            return $content;
    189189        }
    190 
    191190        // capture images & iframes using regex
    192191        if ( (bool) $this->plugin_settings['enable_on_images'] ) {
     
    200199        return $content;
    201200    }
     201
     202    /**
     203     * Remove width and height attr from post thumbnail.
     204     *
     205     * @param string $content
     206     * @return string|string[]|null
     207     * @since 1.1.0
     208     */
     209    public function remove_size_atts_from_thumbnail( $content = '' ) {
     210        return preg_replace( '/(width|height)="\d*"\s/', '', $content );
     211    }
    202212
    203213    /**
Note: See TracChangeset for help on using the changeset viewer.