Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://Бла-Бла.Ню/wp-content/uploads/2015/10/2015-10-06_12-19-311.jpg
- <img class="" width="250" height="250" alt="" src="http://Бла-Бла.Ню/wp-content/uploads/2015/10/2015-10-06_12-19-311.jpg">
- function my_img_replaсe($content){
- $regex = '~(?<!src=")(ht|f)tps?://[w%#~:;&=+,(.(png|jpg|jpeg|gif))/?-]+~is';
- $replace = '<img src="\0" class="" width="250" height="250" alt="">';
- return print preg_replace($regex, $replace, $content);
- }
- add_filter('the_content', 'my_img_replaсe');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement