RSS
 

Text Beautify WordPress Plugin

09 Feb

I’ve just submitted my first ever plugin to the WordPress repository. It’s called Text Beautify and can be found at the following URL:
http://wordpress.org/extend/plugins/text-beautify/

The purpose of the plugin is to beautify post titles, post contents, and comments of your WordPress blog. In post contents and comments, the text is made sentence case. In post titles, it is made title case, so all words are capitalized except for a user-defined list of exceptions, such as: of, an, the, etc. It is really targeted at persons with a refined sense of text aesthetics and people who just want their content to look nicer.

The plugin will also disallow the posting of bothersome repetitive characters. For example, consider someone who uses excessive exclamation marks!!!!! Those will be trimmed down to just a single one! You can define the list of characters that should not be repeated.

Another aesthetic improvement it offers is converting quotation marks, apostrophes, and commas into their “curly” equivalents. You can enable or disable any one, so if you only want double quotes made curly, it is supported.

There are a couple of string user customizations allowed regarding full strings. First, you can define a list of terms for which the case must be preserved. One of the issues with beautifying a body of text is that it may turn lowercase or uppercase terms that are supposed to be capitalized or lowercase, respectively. Some examples are: iPhone, Los Angeles, PHP. The second type of customization is to replace any string with another. If you, for example, wanted to expand any occurrence of “Dr.” to “Doctor” or from “vs” to “versus” that would be possible. (These are pretty mundane examples, but I’m sure you can imagine lots of possibilities for this feature.)

Anyway, I hope you check it out and find it useful. If so, let me know with a comment below. Thanks!

 
 

32,011 views

Tags: ,

Leave a Reply

 

 
  1. Kerith Powell

    April 15, 2012 at 2:28 pm

    I have only used your plugin for a few hours. I use contact form 7 on my site, the way it works is to paste a string like the one below into the post [contact-form-7 id=”75″ title=”Contact form 1″]

    What is the smoothest way to create a rule that would allow this string to be untouched by Text Beautify?

     
  2. rommel

    April 15, 2012 at 8:02 pm

    Hi Kerith- Thanks for writing and pointing out this problem. Please upgrade your plugin to version 0.5 and the issue should be resolved.

    Since it’s very common for other WordPress plugins to use special codes in square brackets, I’ve modified Text Beautify so it will not touch anything contained within a pair of square brackets.

     
  3. James Burnby

    February 3, 2013 at 12:45 pm

    Hi there

    I tried this plugin for a new site we are working on. I found if we put div tags in custom menus it sometimes stripped out the div tag. The problem occurs 50% of the time. Each time the problem occurs it strips out only one out of seven menus randomly.

    e.g. One of our “Navigation Labels” has the text “. Business Problems”.

    All of the text up until Business Problems is taken out sometimes. I isolated this to the text beautify plugin.

    Beautify version: 0.5
    Wordpress version: 3.5.1
    Using a custom theme based off default
    Turned off all other plugins and same issue

    Thanks
    James

     
  4. Locutor Antonio Cezar

    May 10, 2013 at 7:41 am

    Hello!
    I have a doubt:
    Does he do the substitution before recording on the bench of Data or just when is the text exhibited?
    Is just that if he replaces before recording in the DB, then I could try to adapt him to use in the fulfilling of a form in Contact Form 7; But if he just does the substitution of the not acceptable terms in the sometimes of exhibiting the texts, then will have to continue to seek for another solution, because it is horrible when they perform me one of my fomulários all in uppercase, and I have to correct everything before publishing in my site.

    Thanks.

     
  5. rommel

    May 10, 2013 at 7:45 am

    Google Translate did a very confusing job with your comment, but I think what you’re asking is if the text is converted when it’s displayed or when it’s saved to the DB.

    It’s the first option. We don’t want to manipulate the raw data that’s inserted into the DB. We just format the text when it is displayed on the page. Hope that answers your question!

     
  6. Locutor Antonio Cezar

    May 12, 2013 at 10:04 pm

    I apologize for Google.
    I need something to change the text before he went to the DB.
    I’m almost starting to create a form of 0, so I can work because the text before it is sent .

    Thank you.

     
  7. Nico

    June 27, 2013 at 1:05 pm

    Hi. Will this plugin let me NOT have curly quotes and apostrophes? And will it let me change the curly ones that already exist?

    The reason I want this is, text with curly punctuation is difficult to search for, including when I use a feature like Firefox’s “type ahead find” that lets you find text on the current page. And I frequently do that on my own site.

    Thank you!

     
  8. rommel

    June 27, 2013 at 10:55 pm

    Nico- It’s not intended to function that way, but you might be able to define some custom replacements to do that.