Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domantasg/6bacb48a22070ccbef23a7f55b86fcc5 to your computer and use it in GitHub Desktop.
Save domantasg/6bacb48a22070ccbef23a7f55b86fcc5 to your computer and use it in GitHub Desktop.
// Hook the 'the_content' filter hook (content of any post), run the function named 'mfp_Fix_Text_Spacing'
add_filter("the_content", "mfp_Fix_Text_Spacing");
// Automatically correct double spaces from any post
function mfp_Fix_Text_Spacing($the_Post)
{
$the_New_Post = str_replace(" ", " ", $the_Post);
return $the_New_Post;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment