Skip to content

Instantly share code, notes, and snippets.

@Pross Pross/functions.php
Created May 2, 2019

Embed
What would you like to do?
<?php // ignore this line, its only to make highlighting work
add_filter( 'fl_builder_render_module_content', function( $out, $module ) {
if ( 'heading' === $module->slug ) {
$string = $out;
$find = ' ';
$replace = '&nbsp;';
$out = strrev( preg_replace( strrev( "/$find/" ), strrev( $replace ), strrev( $string ), 1 ) );
}
return $out;
}, 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.