{"id":115,"date":"2008-04-17T10:49:54","date_gmt":"2008-04-17T15:49:54","guid":{"rendered":"http:\/\/coffee2code.com\/wp-plugins\/text-hover\/"},"modified":"2010-09-27T12:28:17","modified_gmt":"2010-09-27T17:28:17","slug":"text-hover","status":"publish","type":"page","link":"https:\/\/coffee2code.com\/wp-plugins\/text-hover\/","title":{"rendered":"Text Hover"},"content":{"rendered":"<dl id=\"plugin\">\n<dd class=\"attrib\"><span>Author:<\/span> Scott Reilly<\/dd>\n<dd class=\"attrib\"><span>Version:<\/span> 4.2<\/dd>\n<dd class=\"attrib\"><span>First released:<\/span> 2009-07-15<\/dd>\n<dd class=\"attrib\"><span>Last update:<\/span> 2022-03-23<\/dd>\n<dd class=\"attrib\"><span>Compatibility:<\/span> WP 4.9 &#8211; 5.9.13<\/dd>\n<dd class=\"attrib\"><span>Download:<\/span><span> [ <a href=\"https:\/\/downloads.wordpress.org\/plugin\/text-hover.4.2.zip\">zip<\/a> ]<\/dd>\n<dd class=\"attrib\"><span>Description:<\/span><\/p>\n<div>Add hover text (aka tooltips) to content in posts. Handy for providing explanations of names, terms, phrases, abbreviations, and acronyms.<\/div>\n<\/dd>\n<p><!--more--><\/p>\n<dd>\n<h3>Extended Description<\/h3>\n<div>\n<p>This plugin allows you to easily define help text that appears when a visitor hovers their mouse over a word or phrase in a post or page.<\/p>\n<p>Via the plugin&#8217;s settings, simply specify the words or phrases that you want to be associated with hover text, and of course, the desired hover texts themselves. The format is quite simple; an example of which is shown here:<\/p>\n<pre><code>WP =&gt; WordPress\nMatt =&gt; Matt Mullenweg\nThe Scooby Shack =&gt; the bar where the gang hangs out\n<\/code><\/pre>\n<p>Additional features of the plugin controlled both via settings and filters:<\/p>\n<ul>\n<li>Hover text can be enabled for comments (it isn&#8217;t by default)<\/li>\n<li>Hover text can be made case insensitive (it is case sensitive by default)<\/li>\n<li>Hover text can be limited to doing only one replacement per term, per post (by default, all occurrences of a term are given hovertext)<\/li>\n<li>Hover text can be rendered using the default browser tooltip (by default, the better-looking <a href=\"http:\/\/qtip2.com\/\" rel=\"nofollow ugc\">qTip2<\/a> library is used)<\/li>\n<li>Hover text can be expanded to affect other filters<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> This is not the same as my <a href=\"https:\/\/wordpress.org\/plugins\/text-replace\" rel=\"ugc\">Text Replace<\/a> plugin, which defines terms or phrases that you want replaced by replacement text when displayed on your site. 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.<\/p>\n<p>Links: <a href=\"https:\/\/coffee2code.com\/wp-plugins\/text-hover\/\" rel=\"nofollow ugc\">Plugin Homepage<\/a> | <a href=\"https:\/\/wordpress.org\/plugins\/text-hover\/\" rel=\"ugc\">Plugin Directory Page<\/a> | <a href=\"https:\/\/github.com\/coffee2code\/text-hover\/\" rel=\"nofollow ugc\">GitHub<\/a> | <a href=\"https:\/\/coffee2code.com\" rel=\"nofollow ugc\">Author Homepage<\/a><\/p>\n<h3>Developer Documentation<\/h3>\n<p>Developer documentation can be found in <a href=\"https:\/\/github.com\/coffee2code\/text-hover\/blob\/master\/DEVELOPER-DOCS.md\" rel=\"nofollow ugc\">DEVELOPER-DOCS.md<\/a>. That documentation covers the numerous hooks provided by the plugin. Those hooks are listed below to provide an overview of what&#8217;s available.<\/p>\n<ul>\n<li><code>c2c_text_hover_filters<\/code> : Customize what hooks get text hover applied to them.<\/li>\n<li><code>c2c_text_hover_third_party_filters<\/code> : Customize what third-party hooks get text hover applied to them.<\/li>\n<li><code>c2c_text_hover_filter_priority<\/code> : Override the default priority for the <code>c2c_text_hover<\/code> filter.<\/li>\n<li><code>c2c_text_hover<\/code> Customize or override the setting defining all of the text hover terms and their hover texts.<\/li>\n<li><code>c2c_text_hover_comments<\/code> : Customize or override the setting indicating if text hover should be enabled in comments.<\/li>\n<li><code>c2c_text_hover_case_sensitive<\/code> : Customize or override the setting indicating if text hover should be case sensitive.<\/li>\n<li><code>c2c_text_hover_once<\/code> : Customize or override the setting indicating if text hovering should be limited to once per term per piece of text being processed regardless of how many times the term appears.<\/li>\n<li><code>c2c_text_hover_use_pretty_tooltips<\/code> : Customize or override the setting indicating if prettier tooltips should be used.<\/li>\n<\/ul>\n<p>Find out more at <a href=\"https:\/\/wordpress.org\/plugins\/text-hover\/\">the plugin&#8217;s WordPress Plugin Repository page<\/a>.<\/p>\n<\/div>\n<\/dd>\n<dd class=\"screenshot\">\n<h3>Screenshots<\/h3>\n<p><em>Click to see full-size image.<\/em><\/p>\n<ol>\n<li><a href=\"https:\/\/ps.w.org\/text-hover\/assets\/screenshot-1.png?rev=2556199\"><img src=\"https:\/\/ps.w.org\/text-hover\/assets\/screenshot-1.png?rev=2556199\" alt=\"The admin options page for the plugin, where you define the terms\/acronyms\/phrases and their related hover text\"><\/a>\n<p>The admin options page for the plugin, where you define the terms\/acronyms\/phrases and their related hover text<\/p>\n<\/li>\n<li><a href=\"https:\/\/ps.w.org\/text-hover\/assets\/screenshot-2.png?rev=833537\"><img src=\"https:\/\/ps.w.org\/text-hover\/assets\/screenshot-2.png?rev=833537\" alt=\"The plugin in action for a post when the mouse is hovering over a defined hover text term using the pretty tooltips\"><\/a>\n<p>The plugin in action for a post when the mouse is hovering over a defined hover text term using the pretty tooltips<\/p>\n<\/li>\n<li><a href=\"https:\/\/ps.w.org\/text-hover\/assets\/screenshot-3.png?rev=833537\"><img src=\"https:\/\/ps.w.org\/text-hover\/assets\/screenshot-3.png?rev=833537\" alt=\"The plugin in action for a post when the mouse is hovering over a defined hover text term using default browser tooltips (in this case, Chrome on OSX)\"><\/a>\n<p>The plugin in action for a post when the mouse is hovering over a defined hover text term using default browser tooltips (in this case, Chrome on OSX)<\/p>\n<\/li>\n<\/ol>\n<\/dd>\n<dd><a name=\"installation\"><\/a><\/p>\n<h3>Installation<\/h3>\n<div>\n<ol>\n<li>Whether installing or updating, whether this plugin or any other, it is always advisable to back-up your data before starting<\/li>\n<li>Install via the built-in WordPress plugin installer. Or download and unzip <code>text-hover.zip<\/code> inside the plugins directory for your site (typically <code>wp-content\/plugins\/<\/code>)<\/li>\n<li>Activate the plugin through the &#8216;Plugins&#8217; admin menu in WordPress<\/li>\n<li>Go to the <code>Settings<\/code> -&gt; <code>Text Hover<\/code> admin settings page and customize the settings (namely to define the terms\/abbreviations and their explanations).<\/li>\n<li>Optional: Configure other plugin settings as desired.<\/li>\n<li>Use the terms\/abbreviations in posts and\/or pages (terms\/abbreviations appearing in existing posts will also be affected by this plugin)<\/li>\n<\/ol>\n<\/div>\n<\/dd>\n<dd>\n<\/dd>\n<dd><a name=\"releaselog\"><\/a><\/p>\n<h3>Release Log<\/h3>\n<h4>4.2 (2022-03-22)<\/h4>\n<ul>\n<li>Change: Disallow all but the most basic formatting markup within hover text. Props Rohan Chaudhari.\n<ul>\n<li>As continues to be the case, markup only ever works in the better looking tooltips.<\/li>\n<li>This only enforces the already documented limited markup support to basic formatting tags.<\/li>\n<li>Existing text hovers will be unaffected until the next time settings get saved.<\/li>\n<\/ul>\n<\/li>\n<li>New: Add DEVELOPER-DOCS.md and move hooks documentation into it<\/li>\n<li>Change: Remove settings page helptext about &#8216;replace_once&#8217; setting not applying to multibyte strings since it&#8217;s no longer true<\/li>\n<li>Change: Lowercase the displayed values for &#8216;when&#8217; setting<\/li>\n<li>Change: Move &#8216;code&#8217; tags out of translatable string for &#8216;when&#8217; setting<\/li>\n<li>Change: Note compatibility through WP 5.9+<\/li>\n<li>Change: Remove &#8220;A screenshot of&#8221; prefix from all screenshot captions<\/li>\n<li>Change: Tweak installation instructions in README.md<\/li>\n<li>Change: Fix typo in function docblock<\/li>\n<li>Change: Update copyright date (2022)<\/li>\n<li>New: Add a few more possible TODO items<\/li>\n<\/ul>\n<h4>4.1 (2021-06-29)<\/h4>\n<ul>\n<li>New: Add new setting &#8220;More filters&#8221; to allow for user-specified filters to be processed<\/li>\n<li>Change: Update plugin framework to 064\n<ul>\n<li>064:<\/li>\n<li>New: For checkbox settings, support a &#8216;more_help&#8217; config option for defining help text to appear below checkbox and its label<\/li>\n<li>Fix: Fix URL for plugin listing donate link<\/li>\n<li>Change: Store donation URL as object variable<\/li>\n<li>Change: Update strings used for settings page donation link<\/li>\n<li>063:<\/li>\n<li>Fix: Simplify settings initialization to prevent conflicts with other plugins<\/li>\n<li>Change: Remove ability to detect plugin settings page before current screen is set, as it is no longer needed<\/li>\n<li>Change: Enqueue thickbox during <code>'admin_enqueue_scripts'<\/code> action instead of during <code>'init'<\/code><\/li>\n<li>Change: Use <code>is_plugin_admin_page()<\/code> in <code>help_tabs()<\/code> instead of reproducing its functionality<\/li>\n<li>Change: Trigger a debugging warning if <code>is_plugin_admin_page()<\/code> is used before <code>'admin_init'<\/code> action is fired<\/li>\n<li>062:<\/li>\n<li>Change: Update <code>is_plugin_admin_page()<\/code> to use <code>get_current_screen()<\/code> when available<\/li>\n<li>Change: Actually prevent object cloning and unserialization by throwing an error<\/li>\n<li>Change: Check that there is a current screen before attempting to access its property<\/li>\n<li>Change: Remove &#8216;type&#8217; attribute from <code>style<\/code> tag<\/li>\n<li>Change: Incorporate commonly defined styling for inline_textarea<\/li>\n<li>061:<\/li>\n<li>Fix bug preventing settings from getting saved<\/li>\n<li>060:<\/li>\n<li>Rename class from <code>c2c_{PluginName}_Plugin_051<\/code> to <code>c2c_Plugin_060<\/code><\/li>\n<li>Move string translation handling into inheriting class making the plugin framework code plugin-agnostic\n<ul>\n<li>Add abstract function <code>get_c2c_string()<\/code> as a getter for translated strings<\/li>\n<li>Replace all existing string usage with calls to <code>get_c2c_string()<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Handle WordPress&#8217;s deprecation of the use of the term &#8220;whitelist&#8221;\n<ul>\n<li>Change: Rename <code>whitelist_options()<\/code> to <code>allowed_options()<\/code><\/li>\n<li>Change: Use <code>add_allowed_options()<\/code> instead of deprecated <code>add_option_whitelist()<\/code> for WP 5.5+<\/li>\n<li>Change: Hook <code>allowed_options<\/code> filter instead of deprecated <code>whitelist_options<\/code> for WP 5.5+<\/li>\n<\/ul>\n<\/li>\n<li>New: Add initial unit tests (currently just covering <code>is_wp_version_cmp()<\/code> and <code>get_c2c_string()<\/code>)<\/li>\n<li>Add <code>is_wp_version_cmp()<\/code> as a utility to compare current WP version against a given WP version<\/li>\n<li>Refactor <code>contextual_help()<\/code> to be easier to read, and correct function docblocks<\/li>\n<li>Don&#8217;t translate urlencoded donation email body text<\/li>\n<li>Add inline comments for translators to clarify purpose of placeholders<\/li>\n<li>Change PHP package name (make it singular)<\/li>\n<li>Tweak inline function description<\/li>\n<li>Note compatibility through WP 5.7+<\/li>\n<li>Update copyright date (2021)<\/li>\n<li>051:<\/li>\n<li>Allow setting integer input value to include commas<\/li>\n<li>Use <code>number_format_i18n()<\/code> to format integer value within input field<\/li>\n<li>Update link to <a href=\"http:\/\/coffee2code.com\" class=\"autohyperlink\" target=\"_blank\">coffee2code.com<\/a> to be HTTPS<\/li>\n<li>Update <code>readme_url()<\/code> to refer to plugin&#8217;s readme.txt on <a href=\"http:\/\/plugins.svn.wordpress.org\" class=\"autohyperlink\" target=\"_blank\">plugins.svn.wordpress.org<\/a><\/li>\n<li>Remove defunct line of code<\/li>\n<\/ul>\n<\/li>\n<li>New: Add <code>get_default_filters()<\/code> as getter for core filters, third-party filters, or both<\/li>\n<li>Change: Allow displayed dropdown values for &#8216;when&#8217; setting to be translated<\/li>\n<li>Change: Improve settings page help text by adding, rephrasing, relocating, and tweaaking some formatting<\/li>\n<li>Change: Change text_to_hover setting from being a textarea to inline textarea<\/li>\n<li>Change: Move translation of all parent class strings into main plugin file<\/li>\n<li>Change: Output newlines after block-level tags in settings page<\/li>\n<li>Change: Omit &#8216;cols&#8217; attribute for textarea since it is overridden<\/li>\n<li>Change: Note compatibility through WP 5.7+<\/li>\n<li>Change: Update copyright date (2021)<\/li>\n<li>Change: Change plugin&#8217;s short description<\/li>\n<li>Change: Tweak plugin&#8217;s readme.txt tags<\/li>\n<li>Change: Sync installation instructions in README.txt with what&#8217;s in readme.txt<\/li>\n<li>Fix: Use correct textdomain for a string translation<\/li>\n<li>Unit tests:\n<ul>\n<li>Change: Restructure unit test directories and files into <code>tests\/<\/code> top-level directory\n<ul>\n<li>Change: Move <code>bin\/<\/code> into <code>tests\/<\/code><\/li>\n<li>Change: Move <code>tests\/bootstrap.php<\/code> into <code>tests\/phpunit\/<\/code><\/li>\n<li>Change: In bootstrap, store path to plugin file constant so its value can be used within that file and in test file<\/li>\n<li>Change: Move <code>tests\/*.php<\/code> into <code>tests\/phpunit\/tests\/<\/code><\/li>\n<li>Change: Remove &#8216;test-&#8216; prefix from unit test files<\/li>\n<li>Change: Rename <code>phpunit.xml<\/code> to <code>phpunit.xml.dist<\/code> per best practices<\/li>\n<\/ul>\n<\/li>\n<li>New: Add additional punctuation-related test cases<\/li>\n<li>New: Add helper function <code>get_core_filters()<\/code> and <code>get_3rd_party_filters()<\/code> to DRY up data reuse<\/li>\n<\/ul>\n<\/li>\n<li>New: Add a few more possible TODO items<\/li>\n<li>Change: Updated screenshot for settings page<\/li>\n<\/ul>\n<h4>4.0 (2020-07-16)<\/h4>\n<ul>\n<li>New: Add new setting to allow control over when text hovers are handled early or late in text processing process<\/li>\n<li>New: Add filter <code>c2c_text_hover_filter_priority<\/code> for filtering hook priority for text hover handler<\/li>\n<li>New: Allow text to hover string to begin and\/or end in punctuation.<\/li>\n<li>New: Add TODO.md and move existing TODO list from top of main plugin file into it<\/li>\n<li>Change: Update plugin framework to 050\n<ul>\n<li>050:<\/li>\n<li>Allow a hash entry to literally have &#8216;0&#8217; as a value without being entirely omitted when saved<\/li>\n<li>Output donation markup using <code>printf()<\/code> rather than using string concatenation<\/li>\n<li>Update copyright date (2020)<\/li>\n<li>Note compatibility through WP 5.4+<\/li>\n<li>Drop compatibility with versions of WP older than 4.9<\/li>\n<\/ul>\n<\/li>\n<li>Change: Remove plugin setting page help text indicating order matters (it hasn&#8217;t since v3.8)<\/li>\n<li>Change: Note compatibility through WP 5.4+<\/li>\n<li>Change: Drop compatibility with versions of WP older than 4.9<\/li>\n<li>Change: Update links to <a href=\"http:\/\/coffee2code.com\" class=\"autohyperlink\" target=\"_blank\">coffee2code.com<\/a> to be HTTPS<\/li>\n<li>Unit tests:\n<ul>\n<li>New: Add <code>get_filter_names()<\/code> as a helper method for getting the default and third-party filter names<\/li>\n<li>New: Add <code>unhook_default_filters()<\/code> as a helper method to unhook plugin&#8217;s default filters hooked to <code>text_hover()<\/code><\/li>\n<li>New: Add test case for hover text that includes HTML<\/li>\n<li>New: Add tests for <code>enqueue_scripts()<\/code>, <code>options_page_description()<\/code><\/li>\n<li>New: Add test for setting name<\/li>\n<li>New: Add tests for setting defaults<\/li>\n<li>New: Add explicit tests to ensure falsey hover text values don&#8217;t alter original text<\/li>\n<li>New: Add explicit tests to ensure text replacements don&#8217;t occur within <code>abbr<\/code> tag contents or in any tag attributes<\/li>\n<li>Change: Store plugin instance in test object to simplify referencing it<\/li>\n<li>Change: Remove unnecessary unregistering of hooks in <code>tearDown()<\/code><\/li>\n<li>Change: Add <code>$priority<\/code> argument to <code>test_hover_applies_to_default_filters()<\/code><\/li>\n<li>Change: Remove duplicative <code>reset_options()<\/code> call<\/li>\n<li>Change: Rename unit test function so that it is treated as a unit test<\/li>\n<li>Change: Use HTTPS for link to WP SVN repository in bin script for configuring unit tests (and delete commented-out code)<\/li>\n<\/ul>\n<\/li>\n<li>Change: Update screenshot<\/li>\n<\/ul>\n<\/dd>\n<dd><a name=\"copyright\"><\/a><\/p>\n<h3>Copyright &#038; Disclaimer<\/h3>\n<div class=\"disclaimer\">\nCopyright \u00a9 2009-2026 by Scott Reilly (aka coffee2code)<\/p>\n<p>This program is free software; you can redistribute it and\/or<br \/>\nmodify it under the terms of the GNU General Public License<br \/>\nas published by the Free Software Foundation; either version 2<br \/>\nof the License, or (at your option) any later version.<\/p>\n<p>This program is distributed in the hope that it will be useful,<br \/>\nbut WITHOUT ANY WARRANTY; without even the implied warranty of<br \/>\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br \/>\nGNU General Public License for more details.<\/p>\n<p>You should have received a copy of the GNU General Public License<br \/>\nalong with this program; if not, write to the Free Software<br \/>\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n<\/p><\/div>\n<\/dd>\n<dd><a name=\"discussion\"><\/a><\/p>\n<h3>Discussion \/ Support<\/h3>\n<p>Have any questions, comments, or suggestions? Please provide them via the <a href=\"https:\/\/wordpress.org\/support\/plugin\/text-hover\/\">plugin&#8217;s WordPress.org support forum<\/a>. I&#8217;ll do my best to reply in a timely fashion and help as best I can.<\/p>\n<p>Unfortunately, I cannot provide guaranteed support, nor do I provide support via any other means.<\/p>\n<p>Was this plugin useful useful to you? Consider <a href=\"https:\/\/wordpress.org\/support\/view\/plugin-reviews\/text-hover\">giving it a rating<\/a>. If you&#8217;re inclined to give it a poor rating, please first post to the support forum to give me a chance to address or explain the situation.\n<\/dl>","protected":false},"excerpt":{"rendered":"<p>Author: Scott Reilly Version: 4.2 First released: 2009-07-15 Last update: 2022-03-23 Compatibility: WP 4.9 &#8211; 5.9.13 Download: [ zip ] Description: Add hover text (aka tooltips) to content in posts. Handy for providing explanations of names, terms, phrases, abbreviations, and acronyms. Extended Description This plugin allows you to easily define help text that appears when [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":51,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/pages\/115"}],"collection":[{"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":3,"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/pages\/115\/revisions"}],"predecessor-version":[{"id":365,"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/pages\/115\/revisions\/365"}],"up":[{"embeddable":true,"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/pages\/51"}],"wp:attachment":[{"href":"https:\/\/coffee2code.com\/wp-json\/wp\/v2\/media?parent=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}