Created
June 17, 2017 04:25
-
-
Save shrimp2t/20e54ac05a8137cadbe4b1ef6ab3e26d to your computer and use it in GitHub Desktop.
Get all images from content
This file contains 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
<?php | |
function get_link_img_post( $content ){ | |
global $post; | |
preg_match_all('/src="(.*)"/Us',$content,$matches); | |
$link_img_post = $matches[1]; | |
return $link_img_post; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment