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.

3.5.1 (2014-01-28)

  • Fix logic evaluation to properly honor case_sensitive and replace_once checkbox values

3.5 (2014-01-05)

  • Fix to allow case insensitivity to work when the text being replaced includes HTML
  • Add setting to allow limiting text replacement to once per term per text
  • Add filter 'c2c_text_replace_once'
  • Change to just-in-time (rather than on init) determination if comments should be filtered
  • Add text_replace_comment_text()
  • Add unit tests
  • Update plugin framework to 037
  • Better singleton implementation:
    • Add get_instance() static method for returning/creating singleton instance
    • Make static variable 'instance' private
    • Make constructor protected
    • Make class final
    • Additional related changes in plugin framework (protected constructor, erroring __clone() and __wakeup())
  • Add checks to prevent execution of code if file is directly accessed
  • Re-license as GPLv2 or later (from X11)
  • Add 'License' and 'License URI' header tags to readme.txt and plugin file
  • Use explicit path for require_once()
  • Discontinue use of PHP4-style constructor
  • Discontinue use of explicit pass-by-reference for objects
  • Remove ending PHP close tag
  • Documentation improvements
  • Minor code reformatting (spacing)
  • Note compatibility through WP 3.8+
  • Drop compatibility with version of WP older than 3.6
  • Update copyright date (2014)
  • Regenerate .pot
  • Change donate link
  • Add assets directory to plugin repository checkout
  • Update screenshot
  • Move screenshot into repo's assets directory
  • Add banner

3.2.2

  • Fix bug where special characters were being double-escaped prior to use in regex
  • Update plugin framework to 034
  • Minor readme.txt formatting tweaks

3.2.1

  • Fix bug where $x (where x is number) when used in replacement text gets removed on display
  • Fix to properly escape shortcut keys prior to internal use in preg_replace()
  • Change default for case_sensitive to true
  • Add handle_plugin_upgrade() to fix logic inversion for case_sensitive setting
  • Fix incorrect help text (inverted logic) for case_sensitive setting
  • Update plugin framework to 032
  • Regenerate .pot

3.2

  • Fix bug with settings form not appearing in MS
  • Update plugin framework to 030
  • Remove support for 'c2c_text_replace' global
  • Note compatibility through WP 3.3+
  • Drop support for versions of WP older than 3.1
  • Regenerate .pot
  • Add 'Domain Path' directive to top of main plugin file
  • Add link to plugin directory page to readme.txt
  • Update copyright date (2012)

3.1.1

  • Fix cross-browser (namely IE) handling of non-wrapping textarea text (flat out can't use CSS for it)
  • Update plugin framework to version 028
  • Change parent constructor invocation
  • Create 'lang' subdirectory and move .pot file into it
  • Regenerate .pot

3.1

  • Fix to properly register activation and uninstall hooks
  • Update plugin framework to version v023
  • Save a static version of itself in class variable $instance
  • Deprecate use of global variable $c2c_text_replace to store instance
  • Add __construct() and activation()
  • Note compatibility through WP 3.2+
  • Drop compatibility with version of WP older than 3.0
  • Minor code formatting changes (spacing)
  • Fix plugin homepage and author links in description in readme.txt

3.0.2

  • Update plugin framework to version 021
  • Delete plugin options upon uninstallation
  • Explicitly declare all class functions public static
  • Note compatibility through WP 3.1+
  • Update copyright date (2011)

3.0.1

  • Update plugin framework to version 018
  • Fix so that textarea displays vertical scrollbar when lines exceed visible textarea space

3.0

  • Re-implementation by extending C2C_Plugin_012, which among other things adds support for:
    • Reset of options to default values
    • Better sanitization of input values
    • Offload of core/basic functionality to generic plugin framework
    • Additional hooks for various stages/places of plugin operation
    • Easier localization support
  • Full localization support
  • Allow for replacement of tags, not just text wrapped by tags
  • Disable auto-wrapping of text in the textarea input field for replacements
  • Support localization of strings
  • Add option to indicate if text replacement should be case sensitive. Default is true.
  • NOTE: The plugin is now by default case sensitive when searching for potential replacements
  • For text_replace(), remove 'case_sensitive' argument
  • Allow filtering of text replacements via 'c2c_text_replace' filter
  • Allow filtering of hooks that get text replaced via 'c2c_text_replace_filters' filter
  • Allow filtering/overriding of text_replace_comments option via 'c2c_text_replace_comments' filter
  • Allow filtering/overriding of case_sensitive option via 'c2c_text_replace_case_sensitive' filter
  • Filter 'widget_text' for text replacement
  • Rename class from 'TextReplace' to 'c2c_TextReplace'
  • Assign object instance to global variable, $c2c_text_replace, to allow for external manipulation
  • Remove docs from top of plugin file (all that and more are in readme.txt)
  • Change description
  • Update readme
  • Minor code reformatting (spacing)
  • Add Filters and Upgrade Notice sections to readme.txt
  • Add .pot file
  • Update screenshot
  • Add PHPDoc documentation
  • Add package info to top of file
  • Update copyright date
  • Remove trailing whitespace

2.5

  • Fixed path-related issue for options page
  • Added 'Settings' link for plugin on admin Plugins page
  • Changed permission check
  • More localization-related work
  • Minor code reformatting (spacing)
  • Removed hardcoded path
  • Updated copyright
  • Noted compatibility through 2.8+
  • Dropped compatibility with versions of WP older than 2.6

2.0

  • Handled case where shortcut appears at the very beginning or ending of the text
  • Created its own class to encapsulate plugin functionality
  • Added an admin options page
  • Added option text_replace_comments (defaulted to false) to control whether text replacements should occur in comments
  • Tweaked description and installation instructions
  • Added compatibility note
  • Updated copyright date
  • Added readme.txt and screenshot
  • Tested compatibility with WP 2.3.3 and 2.5

1.0

  • Moved the array $text_to_replace outside of the function and into global space
  • Renamed function from text_replace() to c2c_text_replace()
  • Added installation instruction and notes to plugin file
  • Verified that plugin works for WordPress v1.2+ and v1.5+

0.92

  • Added optional argument $case_sensitive (defaulted to "false")
  • Changed from BSD-new to MIT license

0.91

  • Removed the need to escape special characters used in the shortcut text. Now "?", "(", ")", "[", "]", etc can be used without problems. However, the backspace character "\" should be avoided.
  • Employed a new pattern for matching and replacing text. A huge advantage of this new matching pattern is that it won't match text in a tag (text appearing between "<" and ">").

0.9

  • Initial release

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

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