/ Published in: PHP
Expand |
Embed | Plain Text
function get_image_src($posti = null) { if (!$posti) global $post; else $post->post_content = $posti; $the_content = $post->post_content; $pattern = '!<img.*?src="(.*?)"!'; $image_src = $matches['1'][0]; return $image_src; }
You need to login to post a comment.
