ewels / CPT-Bootstrap-Carousel

WordPress plugin which generates a custom post type for choosing images and content. Outputs Bootstrap Image Carousel (slider) HTML from a shortcode.
http://wordpress.org/plugins/cpt-bootstrap-carousel/
GNU General Public License v2.0
51 stars 36 forks source link

Don't clear the output buffer if there are no images #53

Closed ewels closed 9 years ago

ewels commented 9 years ago

The output buffer is cleared with ob_end_clean(); even when there are no images. This shouldn't really matter - if this breaks the site when there are no images, it'll break it when there are images as well. However, there's no disadvantage to making it conditional on having some output, so it's cleaner to do so.

See this link for details.

ewels commented 9 years ago

This code is already within the if statement that checks for images. Not sure when it was changed, but probably quite a while ago.