Linux 软件免费装
Banner图

Text Hover

开发者 coffee2code
更新时间 2022年3月23日 14:10
捐献地址: 去捐款
PHP版本: 4.9 及以上
WordPress版本: 5.9
版权: GPLv2 or later
版权网址: 版权信息

标签

acronyms terms tooltips help coffee2code abbreviations

下载

2.0 2.2 3.0 1.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.2 3.2.1 3.2.2 3.5 3.5.1 3.6 3.7.1 3.8 3.9 3.9.1 4.0 4.1 4.2

详情介绍:

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. Via the plugin'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: WP => WordPress Matt => Matt Mullenweg The Scooby Shack => the bar where the gang hangs out Additional features of the plugin controlled both via settings and filters: Note: This is not the same as my Text Replace 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. Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

安装:

  1. Whether installing or updating, whether this plugin or any other, it is always advisable to back-up your data before starting
  2. Install via the built-in WordPress plugin installer. Or download and unzip text-hover.zip inside the plugins directory for your site (typically wp-content/plugins/)
  3. Activate the plugin through the 'Plugins' admin menu in WordPress
  4. Go to the Settings -> Text Hover admin settings page and customize the settings (namely to define the terms/abbreviations and their explanations).
  5. Optional: Configure other plugin settings as desired.
  6. Use the terms/abbreviations in posts and/or pages (terms/abbreviations appearing in existing posts will also be affected by this plugin)

屏幕截图:

  • The admin options page for the plugin, where you define the terms/acronyms/phrases and their related hover text
  • The plugin in action for a post when the mouse is hovering over a defined hover text term using the pretty tooltips
  • 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)

升级注意事项:

4.2 Recommended hardening release: restricted HTML tags that can be used as hover text in fancy tooltips, added DEVELOPER-DOCS.md, noted compatibility through WP 5.9, and minor settings page and documentation tweaks. 4.1 Recommended feature release: added new setting to allow for user-specified filters to be processed, updated plugin framework significantly, improved plugin settings page, restructured unit test files, noted compatibility through WP 5.7, and more. 4.0 Minor release: added setting to allow plugin to run later to avoid potential conflicts with other plugins, allowed hover strings to begin/end in punctuation, updated plugin framework, added TODO.md, updated some URLs to be HTTPS, expanded unit testing, and updated compatibility to be WP 4.9-5.4+. 3.9.1 Minor bugfix release: restored hooking of WP's the_excerpt filter instead of get_the_excerpt, corrected some inline documentation, and made minor improvements to unit tests. 3.9 Recommended update: added support for select third-party plugins (Advanced Custom Fields, Elementor), tweaked plugin initialization, minor bugfix, updated plugin framework to 049, noted compatibility through WP 5.3+, created CHANGELOG.md, and updated copyright date (2020) 3.8 Major update: changed default appearance of better-looking tooltip; switched to using abbr tag instead of acronym tag; misc improvements; updated plugin framework to 048; verified compatibility through WP 4.9; dropped compatibility with WP older than 4.7; updated copyright date (2018) 3.7.1 Minor bugfix release: updated qTip2 library, which fixes a JavaScript error it had; updated plugin framework to 044. 3.7 Recommended update: added support for single replacement of multibyte strings; added support for replacing HTML; improved support for localization; verified compatibility through WP 4.5; dropped compatibility with WP older than 4.1; updated copyright date (2016) 3.6 Recommended update: improved support of '&' in text to be replaced; added support for replacing multibyte text; added more unit tests; updated plugin framework to version 039; noted compatibility through WP 4.1+; added plugin icon 3.5.1 Recommended minor bugfix: fix to honor replace_once checkbox value 3.5 Major update: added qTip library for better looking hover popups; added ability to do one hover text per term per post; added ability to enable hover text in comments; added unit tests; compatibility now WP 3.6-3.8+ 3.2.2 Minor bugfix release: fixed bug where special characters were being double-escaped; updated plugin framework. 3.2.1 Recommended bugfix release: fixed bug when $x (where x is a number) would not display when used in replacement string; fix to properly escape shortcut keys prior to internal use; and updated plugin framework. 3.2 Recommended update. Highlights: fixed bug with settings not appearing in MS; updated plugin framework; noted compatibility with WP 3.3+; dropped compatibility with versions of WP older than 3.1. 3.1.1 Bugfix release: fixed bug with cross-browser (mainly, IE) handling of non-wrapping textarea text; updated plugin framework; regenerated .pot file and put it into 'lang' subdirectory. 3.1 Recommended update. Highlights: updated compatibility through WP 3.2; dropped compatibility with version of WP older than 3.0; updated plugin framework, bugfix; and more. 3.0.3 Trivial update: updated plugin framework to v021; noted compatibility with WP 3.1+ and updated copyright date. 3.0.2 Minor plugin framework update and fix so that plugin form's textarea displays vertical scrollbar when lines exceed visible textarea space 3.0 Significant and recommended update. Highlights: re-implementation; added more settings and hooks for customization; disable autowrap in textarea; misc improvements; verified WP 3.0 compatibility; dropped compatibility with WP older than 2.8.

常见问题:

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 abbr to specify the terms and their hover text. Browsers have default handling and display of abbr. 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) : abbr { text-decoration: underline 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, widget text, and optionally comments and comment excerpts. You can use the 'c2c_text_hover_filters' filter to modify that behavior (see Hooks section).

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

The easiest way would be to add "the_title" (or some other filter's name) as a line in the "More filters" setting. That setting allows any additional specified filters to be processed for text hovers. You can also programmatically add to the list of filters that get processed for text hover terms. See the Hooks 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 Hooks section). Note that the option applies to all terms/abbreviations. 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.

Will all instances of a given term be hovered 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 hovered. Or if you are a coder, you can use the 'c2c_text_hover_replace_once' filter (see Hooks section).

Can I style the tooltip?

Yes, but only if you have the pretty tooltips enabled (via settings or the filter). The class you want to style in your custom CSS is '.text-hover-qtip'.

Does this plugin explicitly support any third-party plugins?

Yes. While this plugin is compatible with many other plugins that modify post and widget text, this plugin has explicit built-in support for Advanced Custom Fields and Elementor, which provide additional content areas. This plugin provides hooks that can be used to enable compatibility with other plugins and themes. If you know the name of the filter provided by a plugin, you can add it to the "More filters" setting to have its value processed for text hover.

Why can't I find or access the plugin's settings page even though the plugin is activated?

The plugin's settings page is found at "Settings" -> "Text Hover" in the admin sidebar menu. In order to see that link in the menu and to access the plugin's settings page to configure the plugin, you must be logged in as an administrator. More specifically, you must be a user with the 'manage_options' and 'unfiltered_html' capabilities, which by default are capabilities of the 'administrator' role. If you have a custom role, or your administrator role has been customized, such that both capabilities are not assigned to you, then you cannot configure the plugin.

Does this plugin include unit tests?

Yes.

更新日志:

4.2 (2022-03-22) Highlights: This release introduces security hardening to restrict HTML tags that can be used as hover text in fancy tooltips, adds DEVELOPER-DOCS.md, notes compatibility through WP 5.9, and minor settings page and documentation tweaks. Details: 4.1 (2021-06-29) Highlights: This feature release adds a new setting to allow for user-specified filters to be processed, updates the plugin framework significantly, improves the plugin settings page, restructures unit test files, notes compatibility through WP 5.7, and more. Details: 4.0 (2020-07-16) Highlights: This minor release adds a new setting that can allow the plugin to run later to avoid potential conflicts with other plugins, now allows hover strings to begin or end with punctuation, updates its plugin framework, adds a TODO.md file, updates a few URLs to be HTTPS, expands unit testing, and updates compatibility to be WP 4.9-5.4+. Details: Full changelog is available in CHANGELOG.md.