Bladeren bron

modify google photo egrep pattern

miles 9 jaren geleden
bovenliggende
commit
bc018ad5ce
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      functions.php

+ 2 - 1
functions.php

@@ -635,7 +635,8 @@ function replace_pic($content){
 			$content = apply_filters( 'the_content', $content);
 			$content = str_replace( ']]>', ']]>', $content );
 				
-			$pattern_1 = "/(http|https)\:\/\/\S+(googleusercontent|ggpht)\S+\/s(?<size>\d+)[\-c]*?\/\S+\.(jpg|png|gif)/i";
+			//$pattern_1 = "/(http|https)\:\/\/\S+(googleusercontent|ggpht)\S+\/s(?<size>\d+)[\-c]*?\/\S+\.(jpg|png|gif)/i";
+			$pattern_1 = "/(http|https)\:\/\/\S+(googleusercontent|ggpht)\S+\/s(?<size>\d+)[\-\S+]*?\/\S+\.(jpg|png|gif)/i";
 			$pattern_2 = "/(http|https)\:\/\/\S+(googleusercontent|ggpht)\S+\.(jpg|png|gif)\?imgmax=(?<size>\d+)/i";
 			
 			$content = preg_replace_callback($pattern_1, 'replace', $content);