Text Hover Plugin

özgür koca, ensei tankado, okocaözgür koca

Text Hover 3.1, wordpress plugin, install Text Hover, download Text Hover, abbreviations, acronyms, coffee2code, help, hover, post content, terms, text

Add hover text to regular text in posts. Handy for providing explanations of names, terms, phrases, and acronyms mentioned in your blog.

Hover text are defined as terms/acronyms/phrasees that you expect to use in your blog posts and the expand text you wish to appear when the visitor hovers their mouse over the term. The admin options form for the plugin explains the format, which is quite simple. An example of which is shown here :

WP => WordPress
Matt => Matt Mullenweg
The Scooby Shack => the bar where the gang hangs out
Download Text Hover Plugin

LATEST VERSION

Add hover text to regular text in posts. Handy for providing explanations of names, terms, ph...

Note: This is not the same as my plugin, which defines terms or phrases that you want replaced by replacement text when displayed on your blog. Text Hover instead adds the hover text as additional information for when visitors hover over the term, which is otherwise displayed in the post as you typed it.

Links: |

Author:
Tags: , , , , , , ,

Screenshots

  1. text-hover screenshot 1

    A screenshot of the admin options page for the plugin, where you define the terms/acronyms/phrases and their related hover text

  2. text-hover screenshot 2

    A screenshot of the plugin in action for a post when the mouse is hovering over a defined hover text term

Installation of Text Hover

  1. Unzip text-hover.zip inside the /wp-content/plugins/ directory (or install via the built-in WordPress plugin installer)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. Go to the Settings -> Text Hover admin settings page and customize the settings (namely to define the terms/acronyms and their explanations).
  4. Use the terms/acronyms in posts and/or pages (terms/acronyms appearing in existing posts will also be affected by this plugin)

F.A.Q

In my posts, hover text terms do not appear any differently than regular text (though I can hover over them and see the hover text)! What gives?

The plugin currently makes use of the standard HTML tag acronym to specify the terms and their hover text. Browsers have default handling and display of acronym. It’s possibly that the CSS for your theme is overriding the default display. I use the following in my site’s styles.css file to ensure it displays for me in the manner I prefer (which, by the same token, you can use more CSS formatting to further format the hover terms) :

acronym {
    border-bottom:1px dotted #000;
}

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 terms.

What post fields get handled by this plugin?

By default, the plugin filters the post content, post excerpt fields, and widget text. You can use the ‘c2c_text_hover_filters’ filter to modify that behavior (see Filters section).

How can I get text hover to apply for post titles (or something not processed for text hover by default)?

You can add to the list of filters that get processed for text hover terms. See the Filters section for an example.

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_hover_case_sensitive’ filter (see Filters section). Note that the option applies to all terms/acronyms. If you want to selectively have terms/acronyms be case insensitive, you should leave the case sensitive setting checked and add a listing for each case variation you wish to support.

Changelog

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_hover 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.3

  • 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.2

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

3.0.1

  • Update plugin framework to version 016

3.0

  • Re-implementation by extending C2C_Plugin_015, 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
  • Disable auto-wrapping of text in the textarea input field for hovers
  • Allow filtering of text hover terms and replacement via ‘c2c_text_hover’ filter
  • Allow filtering of hooks that get text hover processing via ‘c2c_text_hover_filters’ filter
  • Allow filtering/overriding of case_sensitive option via ‘c2c_text_hover_case_sensitive’ filter
  • Filter ‘widget_text’ for text hover
  • Rename class from ‘TextHover’ to ‘c2c_TextHover’
  • Assign object instance to global variable, $c2c_text_hover, to allow for external manipulation
  • Remove docs from top of plugin file (all that and more are in readme.txt)
  • Update readme.txt
  • Minor code reformatting (spacing)
  • Add Filters and Upgrade Notice sections to readme.txt
  • Note compatibility with WP 3.0+
  • Drop support for versions of WordPress older than 2.8
  • Add .pot file
  • Update screenshot
  • Add PHPDoc documentation
  • Add package info to top of file
  • Update copyright date
  • Remove trailing whitespace

2.2

  • Fixed bug that allowed text within tag attributes to be potentially replaced
  • Fixed bug that prevented case sensitivity-related option from being taken into account
  • Removed ‘case_sensitive’ argument from text_replace() function since it is controlled by a setting
  • Changed pattern matching criteria to allow text-to-be-hovered to be book-ended on either side with single or double quotes (either plain or curly), square brackets, curly braces, or parentheses
  • Added ability to filter text hover shortcuts via ‘c2c_text_hover_option_text_to_hover’
  • Changed the number of rows for textarea input from 5 to 15
  • Changed plugin_basename to be a class variable initialized during constructor
  • Removed use of single-use temp variable (and instead directly used the value it was holding)
  • Minor code reformatting (mostly spacing)

2.1

  • (Privately released betas previewing features released as part of v2.2)

2.0

  • Encapsulated all functionality into its own class
  • Added ‘Settings’ link to plugin’s plugin listing entry
  • Noted compatibility with WP2.8+
  • Dropped support for pre-WP2.6
  • Updated screenshots
  • Updated copyright date

1.0

  • Initial release

Other Notes

Filters

The plugin exposes three filters for hooking. Typically, the code to utilize these hooks would go inside your active theme’s functions.php file.

c2c_text_hover_filters (filter)

The ‘c2c_text_hover_filters’ hook allows you to customize what hooks get text hover applied to them.

Arguments:

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

Example:

// Enable text hover for post/page titles
add_filter( 'c2c_text_hover_filters', 'more_text_hovers' );
function more_text_hovers( $filters ) {
    $filters[] = 'the_title'; // Here you could put in the name of any filter you want
    return $filters;
}

c2c_text_hover (filter)

The ‘c2c_text_hover’ hook allows you to customize or override the setting defining all of the text hover terms and their hover texts.

Arguments:

  • $text_hover_array (array): Array of text hover terms and their hover texts. This will be the value set via the plugin’s settings page.

Example:

// Add dynamic text hover
add_filter( 'c2c_text_hover', 'my_text_hovers' );
function my_text_hovers( $text_hover_array ) {
    // Add new term and hover text
    $text_hover_array['Matt'] => 'Matt Mullenweg';
    // Unset a term that we never want hover texted
    if ( isset( $text_hover_array['Drupal'] ) )
        unset( $text_hover_array['Drupal'] );
    // Important!
    return $text_hover_array;
}

c2c_text_hover_case_sensitive (filter)

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

Arguments:

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

Example:

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

Tags: , , , , , , , , , , ,

4 comments

  1. Ithink the admin of this webite is in facht working hard in support of his web page, as here every stuff is quality based material.

    Here is my werbpage – pure super green coffee bean extract double strength

  2. Items such as foldable table and chair are
    handy and can be kept away when not in use. With appropriate maintenance the outdoor cushions can last about
    five-8 years. Gently treat the oil or lotion stains and keep working them
    until the stain disappears, or at least become minimal.

  3. I am extremely inspired together with your writing
    talents and also with the structure in your blog.
    Is this a paid topic or did you customize it your self?
    Either way stay up the nice quality writing, it’s rare to see a nice weblog like this one today..

    my blog … mødebooking Sønderborg

  4. Thanks a lot for sharing this with all of us you really
    realize what you are talking about! Bookmarked.
    Kindly also discuss with my site =). We will have a link trade agreement among us

    My homepage møDebooking

Leave a comment