Last active
August 29, 2015 14:03
-
-
Save carlesjove/d3813e0c7226ab188fdc to your computer and use it in GitHub Desktop.
Fetch Img Src
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetch Img Src | |
* Helper function to get an image source from an <img> tag | |
*/ | |
function tm_fetch_img_src( $img_tag ) { | |
return preg_match( '@src="([^"]+)"@' , $img_tag , $src ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment