PHPackages                             humanmade/hm-external-links - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. humanmade/hm-external-links

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

humanmade/hm-external-links
===========================

Automatically detects and handles external links sitewide — opens them in a new tab and optionally displays an icon.

1.0.0(2w ago)02GPL-2.0-or-laterJavaScriptCI passing

Since May 21Pushed 2w agoCompare

[ Source](https://github.com/humanmade/hm-external-links)[ Packagist](https://packagist.org/packages/humanmade/hm-external-links)[ RSS](/packages/humanmade-hm-external-links/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

HM External Links
=================

[](#hm-external-links)

A WordPress plugin that automatically detects and handles external links sitewide — no configuration needed. On every page load it scans all links and:

- Opens external links in a new tab (`target="_blank"`)
- Adds `rel="noopener noreferrer"` (preserving any existing `rel` values)
- Optionally displays an icon after external links in `header`, `footer`, and navigation items

Links added dynamically after page load (e.g. via AJAX or the Interactivity API) are handled automatically too.

Installation
------------

[](#installation)

Drop the plugin folder into `wp-content/plugins/` or `client-mu-plugins/` and activate it.

The `build/` directory is included so no build step is required.

Disabling the icon
------------------

[](#disabling-the-icon)

The icon is shown by default. To disable it:

```
add_filter( 'hm_external_links_show_icon', '__return_false' );
```

Customising the icon appearance
-------------------------------

[](#customising-the-icon-appearance)

The icon inherits its size from two CSS custom properties. If your theme already defines these (e.g. for button arrow icons), the external link icon will match automatically. You can also override them directly:

```
:root {
    --arrow-size: 0.9em;
    --arrow-margin: 0.5em;
}
```

To replace the icon SVG entirely, override the CSS variable the plugin injects:

```
:root {
    --hm-external-icon-url: url('/path/to/your-icon.svg');
}
```

Accessibility note
------------------

[](#accessibility-note)

The plugin adds `target="_blank"` to external links but does not automatically announce this to screen reader users. It is recommended to add a visible or visually-hidden indication (e.g. "(opens in new tab)") in your theme where relevant.

Development:
------------

[](#development)

```
npm install
npm run build
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance96

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

19d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/55361215?v=4)[Pamela Ribeiro](/maintainers/pamprn09)[@pamprn09](https://github.com/pamprn09)

---

Top Contributors

[![pamprn09](https://avatars.githubusercontent.com/u/55361215?v=4)](https://github.com/pamprn09 "pamprn09 (3 commits)")

### Embed Badge

![Health badge](/badges/humanmade-hm-external-links/health.svg)

```
[![Health](https://phpackages.com/badges/humanmade-hm-external-links/health.svg)](https://phpackages.com/packages/humanmade-hm-external-links)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[mautic/core

Mautic Open Source Distribution

9.8k2.6k9](/packages/mautic-core)[roots/wp-stage-switcher

WordPress plugin that allows you to switch between different environments from the admin bar

382458.3k3](/packages/roots-wp-stage-switcher)[vinkla/wordplate

The WordPlate boilerplate

2.2k5.3k](/packages/vinkla-wordplate)[mediawiki/maps

Adds various mapping features to MediaWiki

79149.7k3](/packages/mediawiki-maps)[rainlab/blog-plugin

Blog plugin for October CMS

17158.6k](/packages/rainlab-blog-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
