I'd like to run some code only if a gallery (inserted with the
[gallery] shortcode) has been inserted into a post/page. I did the following:
gallery_shortcode($post->ID) ? $gallery = 1 : $gallery = 0;
However, this always sets
$gallery = 0 whether there's a gallery or not. Am I using this incorrectly?