Automatically turns plaintext URLs and email addresses into links.
This plugin seeks to replace and extend WordPress's default auto-hyperlinking function. This plugin uses different pattern matching expressions than the WordPress default in order to prevent inappropriate adjacent characters from becoming part of the link (as WordPress has improved over the years, nowadays this is just a few edge cases like text links that are braced or bracketed) and it prevents invalid URIs (i.e. http://blah) from becoming links.
More significantly, this plugin adds configurability to the auto-hyperlinker such that you can configure:
- If you want text URLs to only show the hostname
- If you want text URLs truncated after N characters
- If you want auto-hyperlinked URLs to open in new browser window or not
- If you want the URI scheme (i.e. "http://") to be stripped for displayed links
- The text to come before and after the link text for truncated links
- If you want rel="nofollow" to be supported
- If you wish to support additional domain extensions not already configured into the plugin
- If you want certain domains to be omitted from auto-linking
This plugin will recognize any explicit URI scheme (http|https|ftp|news)://, etc, as well as email addresses. It also adds the new ability to recognize Class B domain references (i.e. "
somesite.net", not just domains prepended with "www.") as valid links (i.e. "
wordpress.org" would get auto-hyperlinked)
The following domain extensions (aka TLDs, Top-Level Domains) are recognized by the plugin: com, org, net, gov, edu, mil, us, info, biz, ws, name, mobi, cc, tv. These only comes into play when you have a plaintext URL that does not have an explicit URI scheme specified. If you need support for additional TLDs, you can add more via the plugin's admin options page or via filter.
This plugin also activates auto-hyperlinking of text links within post/page content.
Links:
Plugin Homepage |
Plugin Directory Page |
GitHub |
Author Homepage
5.4.1 (2020-01-16)
- Change: Disable Advanced Custom Field (ACF) support by default (it can be activated via new setting)
- Fix: Fix broken link to plugin help. Props neotrope.
- Fix: Fix typo in changelog for v5.4
5.4 (2019-11-07)
Highlights:
- This release adds support for the Advanced Custom Fields plugin, adds a filter to customize which HTML tags get excluded from auto-linkification, and notes compatibility through WP 5.3.
Details:
- New: Add filter
autohyperlink_no_autolink_content_tags
for configuring which HTML tags don't get their content autolinked
- New: Add support for Advanced Custom Fields (ACF) plugin fields
- Autolinks the following ACF field types: text, textarea, url, wysiwyg
- Adds filter
c2c_autohyperlink_urls_acf_filters
for customizing which ACF-related filters to hook
- New: Unit tests: Add tests to verify default hooks get hooked
- Change: Note compatibility through WP 5.3+
- Change: Minor tweaks to descriptions of functions in inline documentation
- Change: Update copyright date (2020)
5.3 (2019-04-19)
Highlights:
- This minor release improves some link handling and notes compatibility through WP 5.3+, but mostly improves upon plugin internals.
Details:
- Change: Linkify emails before URLs instead of after in order to avoid an email username potentially matching as a domain
- Change: Tweak regex used for fixing links within links
- Change: Initialize plugin on
plugins_loaded
action instead of on load
- Change: Update plugin framework to 049
- 049:
- Correct last arg in call to
add_settings_field()
to be an array
- Wrap help text for settings in
label
instead of p
- Only use
label
for help text for checkboxes, otherwise use p
- Ensure a
textarea
displays as a block to prevent orphaning of subsequent help text
- Note compatibility through WP 5.1+
- Update copyright date (2019)
- 048:
- When resetting options, delete the option rather than setting it with default values
- Prevent double "Settings reset" admin notice upon settings reset
- New: Add CHANGELOG.md file and move all but most recent changelog entries into it
- New: Add inline documentation for hooks
- New: Add inline comments to document each segment of the regex used for fixing embedded links
- Unit tests:
- New: Add some failing unit tests for known edge cases to be addressed later
- Change: Update unit test install script and bootstrap to use latest WP unit test repo
- New: Add a bunch of TODO considerations
- Change: Note compatibility through WP 5.1+
- Change: Add 'License' and 'License URI' to plugin header
- Change: Rename readme.txt section from 'Filters' to 'Hooks' and provide a better section intro
- Change: Update installation instruction to prefer built-in installer over .zip file
- Change: Update copyright date (2019)
- Change: Update License URI to be HTTPS
- Change: Split paragraph in README.md's "Support" section into two
Full changelog is available in CHANGELOG.md.