I messed up with one of my code in functions.php, can someone tell me what this line does?
$output = preg_match_all(''/<img.+src=[''"]([^''"]+)[''"].*>/i'', $post->post_content, $matches);
Obviously, that doesn’t work. That code above was affected by that bug in WordPress that makes single quotes ' become '' when saved (that WordPress editor at the WP backend).
TIA.
The line finds all src=”…” tags for images. The regular expression literally says ” or ‘, followed by anything that is not ‘ or “, followed by another ‘ or “.
To fix it: