WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Text Replace

Replace text with other text. Handy for creating shortcuts to common, lengthy, or frequently changing text/HTML, or for smilies.

Does this plugin modify the post content in the database?

No. The plugin filters post content on-the-fly.

Will this work for posts I wrote prior to installing this plugin?

Yes, if they include strings that you've now defined as shortcuts.

What post fields get handled by this plugin?

By default, the plugin filters the post content, post excerpt fields, widget text, and optionally comments and comment excerpts. You can use the 'c2c_text_replace_filters' filter to modify that behavior (see Filters section).

How can I get text replacements to apply for post titles (or something not text-replaced by default)?

You can add to the list of filters that get text replacements using something like this (added to your theme's functions.php file, for instance):

add_filter( 'c2c_text_replace_filters', 'more_text_replacements' );
function more_text_replacements( $filters ) {
    $filters[] = 'the_title'; // Here you could put in the name of any filter you want
    return $filters;
}

Is the plugin case sensitive?

By default, yes. There is a setting you can change to make it case insensitive. Or you can use the 'c2c_text_replace_case_sensitive' filter (see Filters section).

I use :wp: all the time as a shortcut for WordPress, but when I search posts for the term "WordPress", I don't see posts where I used the shortcut; why not?

Rest assured search engines will see those posts since they only ever see the posts after the shortcuts have been replaced. However, WordPress's search function searches the database directly, where only the shortcut exists, so WordPress doesn't know about the replacement text you've defined.

Will all instances of a given term be replaced in a single post?

By default, yes. There is a setting you can change so that only the first occurrence of the term in the post gets replaced. Or if you are a coder, you can use the 'c2c_text_replace_once' filter (see Filters section).

Does this plugin include unit tests?

Yes.

Requires: 3.6 or higher
Compatible up to: 3.8.3
Last Updated: 2014-1-28
Downloads: 21,933

Ratings

4 stars
4.2 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
0,1,0 100,1,1
100,2,2
100,1,1
100,1,1
100,1,1 40,5,2
0,2,0
0,1,0 100,1,1
0,1,0
0,1,0
100,1,1
100,1,1