#15: the_content
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 | |
/** | |
* Convert double-spaced sentence endings to singles | |
* | |
* @param string $content The post content. | |
* | |
* @return string The filtered post content. | |
*/ | |
function wpdocs_double_spaces_to_singles( $content ) { | |
// Replaces '. ' with '. ' | |
$content = str_replace( '. ', '. ', $content ); | |
return $content; | |
} | |
add_filter( 'the_content', 'wpdocs_double_spaces_to_singles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://fotd.werdswords.com/the_content/