Skip to content

Commit

Permalink
Filter for image matching regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Oct 2, 2015
1 parent 69ad5dd commit cbf7dcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wp-tevko-responsive-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ function tevkori_filter_content_images( $content ) {

// Pattern for matching all images with a `src` from the uploads directory.
$pattern = '|<img ([^>]+' . preg_quote( $path_to_upload_dir ) . '[^>]+)>|i';
$pattern = apply_filters( 'tevkori_search_images_pattern', $pattern );
preg_match_all( $pattern, $content, $matches );

$images = $matches[0];
Expand Down

0 comments on commit cbf7dcb

Please sign in to comment.