This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////// | |
// | |
// DO NOT DELETE ME! | |
// Please take care when editing the announcement banner - it contains custom Javascript/CSS to improve Jira's UI. | |
// | |
///////////////////// | |
///////////////////// | |
// Inspired by | |
// https://jira.atlassian.com/browse/GHS-3690?focusedCommentId=693585&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-693585 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Forked From: https://gist.github.com/ninnypants/1668216 | |
* | |
* Modified to handle comments before or after an element. | |
*/ | |
add_filter( 'the_content', 'remove_empty_p', 20, 1 ); | |
function remove_empty_p( $content ){ | |
// clean up p tags around block elements | |
$content = preg_replace( array( |