Are you having a laugh?
How about some customer service here…
The main change requires editing a cornerstone file and I have no idea how this will impact how cornerstone works.
/wp-content/themes/pro/cornerstone/includes/utility/helpers.php
As far as I can tell the code you are using to strip the empty p and br tags is the source of this issue - I would imagine this is something you need to resolve yourselves… Wordpress has a built in feature to deal with this issue shortcode_unautop - if this is the best way to FIX the issue then it should be done by ThemeCo don’t you think?
As I suspected, the additional code to strip the 2x empty p tags is only required because I have also used the columnize shortcode - there are no empty p tags using shortcode_unautop, only if I also use columnize which will then require the additional code in functions - looking at the regex it seems to also cover the br tags so this may or may not be required depending on the page content.
However, it may be the solution to why you are using cs_noemptyp in the first place - if my solution using shortcode_unautop does not break cornerstone then great, but I do not want to edit parent theme files to resolve broken shortcodes which are provided by the theme and I should not have to spend several hours more testing.
/**
* Remove empty <p> tags
*/
add_filter('the_content', 'remove_empty_p', 20, 1);
function remove_empty_p($content){
$content = force_balance_tags( $content );
$content = preg_replace( '#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content );
$content = preg_replace( '~\s?<p>(\s| )+</p>\s?~', '', $content );
return $content;
}
I am more than happy to ‘Share’ as you put it - but being a paid customer I expect a better level of support than you have provided here. I am contacting you with an issue in your implementation, not spamming your forums with basic questions which fall way out of scope in regards to support - yet you seem more than happy to waste your time replying to ‘How do I change the colour of XYZ’
I am not impressed! 