WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Extra Sentence Space

Force browsers to display two spaces (when present) between sentences.

Filters

The plugin is further customizable via two filters. Typically, these customizations would be put into your active theme's functions.php file, or used by another plugin.

c2c_extra_sentence_space

The 'c2c_extra_sentence_space' filter allows you to use an alternative approach to safely invoke c2c_extra_sentence_space() in such a way that if the plugin were deactivated or deleted, then your calls to the function won't cause errors in your site. This only applies if you use the function directly, which is not typical usage for most users.

Example:

Instead of:

<?php echo c2c_extra_sentence_space( $mytext ); ?>

Do:

<?php echo apply_filters( 'c2c_extra_sentence_space', $mytext ); ?>

c2c_extra_sentence_space_punctuation

The 'c2c_extra_sentence_space_punctuation' filter allows you to customize the punctuation, characters, and/or symbols after which double-spacing (when present) is preserved. By default these are '.!?'.

Arguments:

  • $punctuation (string): The default characters after which double-spacing should be preserved. Default is '.!?'.

Example:

add_filter( 'c2c_extra_sentence_space_punctuation', 'more_extra_space_punctuation' );
function more_extra_space_punctuation( $punctuation ) {
    // Add the '/' and ')' characters to the list of characters
    return $punctuation . '/)';
}

Requires: 1.5 or higher
Compatible up to: 3.8.3
Last Updated: 2013-12-13
Downloads: 3,951

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,2,2
100,1,1