Categories

  • Access & Security 95
  • Administration 171
  • Advertisement 92
  • Audio & Video 66
  • Author & Content 99
  • Comments 96
  • Communication 110
  • Communities & Forums 84
  • Development 47
  • E-Commerce 76
  • Email Management 53
  • Events & Calendars 80
  • Language 25
  • Map & Weather 44
  • Migration & Conversion 28
  • Miscellaneous 254
  • Mobile 15
  • Photos 143
  • Plugins 260
  • SEO & Site Speed 118
  • Social 186
  • Theme Enhancement 169



  • Add this plugin to a List

    You need to be logged in to add this plugin to your list.

    Text Replace

    Add to List

    This plugin allows you to easily define text or HTML that should be used in your posts in place of words or phrases that are actually present in the posts. This is a handy technique for creating shortcuts to common, lengthy, or frequently changing text/HTML, or for smilies.

    Additional features of the plugin controlled both via settings and filters:

    • Text replacement can be enabled for comments (it isn’t by default)
    • Text replacement can be made case insensitive (it is case sensitive by default)
    • Text replacement can be limited to doing only one replacement per term, per post (by default, all occurrences of a term are replaced)
    • Text replacement can be handled early or late in WordPress’s text filtering process (it’s early by default)

    A few things to keep these things in mind:

    • Your best bet with defining shortcuts is to define something that would never otherwise appear in your text. For instance, bookend the shortcut with colons:

      :wp: => WordPress
      :aol: => America Online, Inc.

    Otherwise, you risk proper but undesired replacements:

    Hi => Hello
    

    Would have the effect of changing “His majesty” to “Hellos majesty”.

    • If you intend to use this plugin to handle smilies, you should probably disable WordPress’s default smilie handler on the Writing Settings admin page.

    • This plugin is set to filter the_content, the_excerpt, widget_text, and optionally, get_comment_text and get_comment_excerpt. Filters from popular plugins such as Advanced Custom Fields (ACF) and Elementor are also handled by default (see FAQ for specifics). The filter ‘c2c_text_replace_filters’ can be used to add or modify the list of filters affected.

    • Text inside of HTML tags (such as tag names and attributes) will not be matched. So, for example, you can’t expect the :mycss: shortcut to work in: <a href=”” :mycss:>text</a>.’.

    • SPECIAL CONSIDERATION: Be aware that the shortcut text that you use in your posts will be stored that way in the database (naturally). While calls to display the posts will see the filtered, text replaced version, anything that operates directly on the database will not see the expanded replacement text. So if you only ever referred to “America Online” as “:aol:” (where “:aol:” => “America Online“), visitors to your site will see the linked, expanded text due to the text replace, but a database search would never turn up a match for “America Online”.

    • However, a benefit of the replacement text not being saved to the database and instead evaluated when the data is being loaded into a web page is that if the replacement text is modified, all pages making use of the shortcut will henceforth use the updated replacement text.

    Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

    Hooks

    The plugin exposes a number of filters for hooking. Typically, the code to utilize these hooks would go inside your active theme’s functions.php file. Bear in mind that all of the features controlled by these filters are configurable via the plugin’s settings page. These filters are likely only of interest to advanced users able to code.

    c2c_text_replace_filters (filter)

    The ‘c2c_text_replace_filters’ hook allows you to customize what hooks get text replacement applied to them.

    Arguments:

    • $hooks (array): Array of hooks that will be text replaced.

    Example:

    /**
     * Enable text replacement for post/page titles.
     *
     * @param array $filters Filters handled by the Text Replace plugin.
     * @return array
     */
    function more_text_replacements( $filters ) {
        $filters[] = 'the_title'; // Here you could put in the name of any filter you want
        return $filters;
    }
    add_filter( 'c2c_text_replace_filters', 'more_text_replacements' );
    

    c2c_text_replace_third_party_filters (filter)

    The ‘c2c_text_replace_third_party_filters’ hook allows you to customize what third-party hooks get text replacement applied to them. Note: the results of this filter are then passed through the c2c_text_replace_filters filter, so third-party filters can be modified using either hook.

    Arguments:

    • $filters (array): The third-party filters whose text should have text replacement applied. Default array( 'acf/format_value/type=text', 'acf/format_value/type=textarea', 'acf/format_value/type=url', 'acf_the_content', 'elementor/frontend/the_content', 'elementor/widget/render_content' ).

    Example:

    /**
     * Stop text replacements for ACF text fields and add text replacements for a custom filter.
     *
     * @param array $filters
     * @return array
     */
    function my_c2c_text_replace_third_party_filters( $filters ) {
        // Remove a filter already in the list.
        unset( $filters[ 'acf/format_value/type=text' ] );
        // Add a filter to the list.
        $filters[] = 'my_plugin_filter';
        return $filters;
    }
    add_filter( 'c2c_text_replace_third_party_filters', 'my_c2c_text_replace_third_party_filters' );
    

    c2c_text_replace_filter_priority (filter)

    The ‘c2c_text_replace_filter_priority’ hook allows you to override the default priority for the ‘c2c_text_replace’ filter.

    Arguments:

    • $priority (int): The priority for the ‘c2c_text_replace’ filter. The default value is 2.
    • $filter (string): The filter name.

    Example:

    /**
     * Change the default priority of the 'c2c_text_replace' filter to run after most other plugins.
     *
     * @param int $priority The priority for the 'c2c_text_replace' filter.
     * @return int
     */
    function my_change_priority_for_c2c_text_replace( $priority, $filter ) {
        return 1000;
    }
    add_filter( 'c2c_text_replace_filter_priority', 'my_change_priority_for_c2c_text_replace', 10, 2 );
    

    c2c_text_replace (filter)

    The ‘c2c_text_replace’ hook allows you to customize or override the setting defining all of the text replacement shortcuts and their replacements.

    Arguments:

    • $text_replacement_array (array): Array of text replacement shortcuts and their replacements. This will be the value set via the plugin’s settings page.

    Example:

    /**
     * Add dynamic shortcuts.
     *
     * @param array $replacements Array of replacement terms and their replacement text.
     * @return array
     */
    function my_text_replacements( $replacements ) {
        // Add replacement
        $replacements[':matt:'] => 'Matt Mullenweg';
        // Unset a replacement that we never want defined
        if ( isset( $replacements[':wp:'] ) )
            unset( $replacements[':wp:'] );
        // Important!
        return $replacements;
    }
    add_filter( 'c2c_text_replace', 'my_text_replacements' );
    

    c2c_text_replace_comments (filter)

    The ‘c2c_text_replace_comments’ hook allows you to customize or override the setting indicating if text replacement should be enabled in comments.

    Arguments:

    • $state (bool): Either true or false indicating if text replacement is enabled for comments. The default value will be the value set via the plugin’s settings page.

    Example:

    // Prevent text replacements from ever being enabled in comments.
    add_filter( 'c2c_text_replace_comments', '__return_false' );
    

    c2c_text_replace_case_sensitive (filter)

    The ‘c2c_text_replace_case_sensitive’ hook allows you to customize or override the setting indicating if text replacement should be case sensitive.

    Arguments:

    • $state (bool): Either true or false indicating if text replacement is case sensitive. This will be the value set via the plugin’s settings page.

    Example:

    // Prevent text replacement from ever being case sensitive.
    add_filter( 'c2c_text_replace_case_sensitive', '__return_false' );
    

    c2c_text_replace_once (filter)

    The ‘c2c_text_replace_once’ hook allows you to customize or override the setting indicating if text replacement should be limited to once per term per piece of text being processed regardless of how many times the term appears.

    Arguments:

    • $state (bool): Either true or false indicating if text replacement is to only occur once per term. The default value will be the value set via the plugin’s settings page.

    Example:

    // Only replace a term/shortcut once per post.
    add_filter( 'c2c_text_replace_once', '__return_true' );
    
    Rate This Plugin

    Please Login to Rate this Plugin!

    Function

    Feature

    Support

    0 Votes
    Not Rated Yet

    Wordpress.org Stats

    Ratings4.4
    Votes16
    Downloads61,481
    Last Updated24 Days ago
    Published16 years ago

    Report Wrong Category!

    Do you think this Plugin belongs to another Category?

    What Category Should this Plugin belong to? *

    Reason *

    Create a Plugin List

    You need to be Logged in to Create a Plugin List.

    Submit A plugin

    You need to be logged in to submit a plugin.

    Help

    WPD is the unofficial online plugin directory of WordPress.

    An attempt has been made to list Only functional, active,efficient and up-to-date plugins.

    Categorized : Plugin are listed by category and subcategory based on functionality and uses. Here you can browse wordpress plugin from our neatly categorized plugin directory and sort the plugins by rating, votes, last updated and published and search plugins using tags.

    Search : Plugins can be searched by their functionality using multi-tag search and you can search plugins using their exact name although we are not ensuring Google like search accuracy.

    Create Plugin Lists : You will be able to create list of plugins and share them with Wordpress Community or you can keep them private and use them as a bookmarks.
    e.g. Plugins That I’ve Used on My Site, Best Event Management Plugins, Christmas Plugins etc.

    If you think certain awesome plugin is not in the directory then notify us through our Submit a Plugin page.

    Browsing the Plugin Directory

    Browse by Category

    In WPD, Plugins are categorized carefully. You can browse all the categories from the homepage or you can access the category lists from any page by clicking the button from the left of the website.


    Browse by Tags

    Each plugin listed in WPD is marked with useful tags. You can browse plugins by Tags from the All Tags page


    Searching in WPD

    Multi Tag Search

    You can search plugins using multiple tags. To perform a multi-tag search. Go to Homepage and then in the search field type any keywords or tags(comma separated) and then click on the search button. To search plugins from a selected category just select the category from the dropdown and type your tags.


    Searching a specific Plugin in WPD

    If you want to find a specific plugin in our directory, Go to Homepage and then select the "Search in Title" option. Then write the name of the plugin and click the search button to find the Plugin.


    Plugin Lists

    Whats a Plugin List

    Plugin Lists are user created lists of plugins. Any registered users can create Plugin Lists and share it with anyone or make it private.


    Why Create a plugin List?
    • Easy to keep track of your favourite and useful plugin.

    • Share list of plugins on blogs, social media or to a client.

    • Keep a track of what plugins you installed in which of your blogs by creating a list for each blog



    Creating a Plugin List

    To create a Plugin List, click the button from the left of the page; a popup box will appear. In the "List Name" field, put the name of the List. eg: Best Seo plugins for your site.
    In the Description field, put a few words describing the List.
    By default, lists are automatically published as public, which is visible to everyone. If you do not want others to see the List, select "Private" from the dropdown list. Then click the "Create List" button to create the list.


    Adding Plugins to your List

    To add a plugin to your List, go to a plugin page and click the "Add to List" button. A popup box will appear where you can select in which of your list you want to add this plugin. You can add a note if you want, this note will appear below the plugin in your list.
    P.S: You can only add plugins that are in our directory.

    Your Lists will appear in our "Plugin Lists" page when you set the list as "Public" and your list contains atleast 2 plugins.


    Editing your Lists

    When you are on your list page, notice there is a button on the top right corner of the page. Click it to edit the List Name and the List Description.


    Accessing All your Lists

    You can access all your Plugin lists by going to your profile and clicking the "Lists" tab.


    Removing your Lists

    You can remove your Plugin lists by going to your profile and clicking the "Lists" tab. on top right of each list click the button to remove the list completely.

    While tremendous effort has been put to keep this directory precise and complete, still errors and omissions are unavoidable and possible. We welcome any suggestions for corrections, deletions, and idea that might improve the overall experience.

    To submit a Feedback click the from the bottom right corner of the site.

    Brave Popup Builder
    Our Latest WordPress Plugin
    Create Awesome WordPress Popups with Intuitive visual Editor. Choose from hundreds of Presets. Create Beautiful Popups and convert more visitors to subscribers, clients and customers.
    This Popup was Built with this plugin.
    Marketing knowledge
    Upgrade your
    Leverage agile frameworks to provide a robust synopsis for high overviews.
    Register or log in to assess the record