Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

JSM's Non-Breaking Space for French Content

Adds a non-breaking space between words and punctuation marks to avoid inappropriate line-breaks in French.

This plugin adds non-breaking spaces required by the French language in the content, excerpt, comments, and text widget — skipping over pre-formatted code blocks, styles and scripts.

If the <!--:fr--> HTML tag is found (used by some multilingual plugins), non-breaking spaces are added only between the <!--:fr--> and <!--:--> HTML tags.

There are no plugin settings — simply install and activate the plugin.

Filters for Developers

'nbsp_french_add_filters' ( array $names ) — An associative array of filter names (and their priority number) to hook by default.

'nbsp_french_currencies' ( $pcre ) — A list of recognized currencies.

'nbsp_french_preg_first_second_last' ( array $pattern ) — An array of patterns to match. Spaces are replaced in the second set of parenthesis, and the returned string corresponds to the first, second, and last set of parenthesis.

To hook additional filters, include their names and priority in the 'nbsp_french_add_filters' array, or hook them individually in your functions.php file:

add_filter( 'your_filter_name', array( 'NbspFrench', 'filter' ) );
Author JS Morisset
Profile
Contributors jsmoriss
Tags exclamation, french, interrogation, line break, nbsp, non-breaking, puntuation, question, space

Automated Install

  1. Go to the wp-admin/ section of your website.
  2. Select the Plugins menu item.
  3. Select the Add New sub-menu item.
  4. In the Search box, enter the plugin name.
  5. Click the Search Plugins button.
  6. Click the Install Now link for the plugin.
  7. Click the Activate Plugin link.

Semi-Automated Install

  1. Download the plugin archive file.
  2. Go to the wp-admin/ section of your website.
  3. Select the Plugins menu item.
  4. Select the Add New sub-menu item.
  5. Click on Upload link (just under the Install Plugins page title).
  6. Click the Browse... button.
  7. Navigate your local folders / directories and choose the zip file you downloaded previously.
  8. Click on the Install Now button.
  9. Click the Activate Plugin link.

Repositories

Version Numbering Scheme

Version components: {major}.{minor}.{bugfix}-{stage}{level}

  • {major} = Major code changes / re-writes or significant feature changes.
  • {minor} = New features / options were added or improved.
  • {bugfix} = Bugfixes or minor improvements.
  • {stage}{level} = dev < a (alpha) < b (beta) < rc (release candidate) < # (production).

Note that the production stage level can be incremented on occasion for simple text revisions and/or translation updates. See PHP's version_compare() documentation for additional information on "PHP-standardized" version numbering.

Changelog / Release Notes

Version 1.8.1-1 (2016/12/13)

  • New Features
    • None
  • Improvements
    • None
  • Bugfixes
    • None
  • Developer Notes
    • Changed the 'nbsp_french_add_filters' array to an associative array with filter names and priority numbers.
    • Removed the 'nbsp_french_filter_priority' and 'nbsp_french_filter_'.$filter_name filters.

Version 1.8.0-1 (2016/12/13)

  • New Features
    • None
  • Improvements
    • Added support for currency symbols and numeric thousands (example: 1 000,10 $).
  • Bugfixes
    • None
  • Developer Notes
    • Added a callback to the preg_replace() function to replace spaces in the second set of parenthesis, and return a string corresponding to the first, second, and last set of parenthesis.
    • Renamed the 'nbsp_french_preg_pattern' filter by 'nbsp_french_preg_first_second_last'.
    • Removed the 'nbsp_french_preg_replace' filter.

Version 1.7.2-1 (2016/12/04)

  • New Features
    • None
  • Improvements
    • Added support for <style></style> code blocks.
  • Bugfixes
    • None
  • Developer Notes
    • None

Frequently Asked Questions

  • None

Other Notes

Additional Documentation

  • None
Share  
Download
Version 1.8.1-1

Requires WordPress version: 3.8 or higher

Compatible up to: 4.7.2

Last Updated 03 Feb 2017

Date Added: 25 Nov 2013

Plugin Homepage

Evaluation
star1
star2
star3
star4
star5

5 stars
5 ratings
1,834 downloads

Compatibility

Not Enough Data

Reports:
Works: 0
Broken: 0