get_first_image_for() shouldn't run do_shortcode()
-
Hi!
Just wanted to let you know that the function get_first_image_for() is running a line of code that can cause some weird behavior.
Line 277:
if ($content = do_shortcode($post->post_content))
If you have (as in my case) shortcodes in a page that directly echos html, that html will be outputted at the top of the page just below the <body>-tag. I had to change this line to:
if ($content = $post->post_content)
in order to make it work. Just thought you guys should know.
- The topic ‘get_first_image_for() shouldn't run do_shortcode()’ is closed to new replies.