PHPackages                             livy/plumbing-normalize-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. livy/plumbing-normalize-links

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

livy/plumbing-normalize-links
=============================

Normalize the output of WordPress's native "link" in ACF.

1.6.1-alpha(5y ago)250MITPHPPHP ~7.3

Since Oct 2Pushed 5y ago3 watchersCompare

[ Source](https://github.com/alwaysblank/plumbing-normalize-links)[ Packagist](https://packagist.org/packages/livy/plumbing-normalize-links)[ RSS](/packages/livy-plumbing-normalize-links/feed)WikiDiscussions dev Synced 3w ago

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

Normalize Links
===============

[](#normalize-links)

[![Build Status](https://camo.githubusercontent.com/7a43d1dd187abd33d7eb67a90d2405cb84b2a358a6ba6f297ab082ab477ba956/68747470733a2f2f7472617669732d63692e6f72672f616c77617973626c616e6b2f706c756d62696e672d6e6f726d616c697a652d6c696e6b732e7376673f6272616e63683d646576)](https://travis-ci.org/alwaysblank/plumbing-normalize-links)

The purpose of this small package is to ingest the link arrays produced by [ACF’s "link" field type](https://www.advancedcustomfields.com/resources/link/), do a bit of logic on them, and provide a nice interface for interacting with that data. It can also accept urls as plain strings.

Usage
-----

[](#usage)

ACF field

```
$Link = new Normalized(get_field('some_link'));

$Link->valid(); //whether or not this is a "valid" link
$Link->url(); // the URL of the link
$Link->label(); // the "title" set for this link
$Link->newTab(); // whether this link should be opened in a new tab
$Link->probablyExternal() // if the link is (probably) external or not
```

Simple string

```
$Link = new Normalized('https://www.alwaysblank.org');
```

### Settings

[](#settings)

A small number of settings are also supported, which can be passed when instantiated.

```
$Link = new Normalized(get_field('some_link'), [
    'label' => "Learn More", // Used as a fallback if there is no `title.`
    'external_in_new_tab' => true, // Always open external links in new tab
    'validate' => [
        'url' => false,
        'label' => false,
    ], // Validate url and/or label
]);
```

`label` defaults to "Learn More" and `external_in_new_tab` defaults to `true`. `validate` defaults to *not* validating inputs. You can specify which items (`url` or `label`) to validated, or set `validate` to `true` to validate all items.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% 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

Every ~4 days

Total

11

Last Release

2060d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23412884?v=4)[Ben](/maintainers/alwaysblank)[@alwaysblank](https://github.com/alwaysblank)

---

Top Contributors

[![alwaysblank](https://avatars.githubusercontent.com/u/23412884?v=4)](https://github.com/alwaysblank "alwaysblank (19 commits)")[![QWp6t](https://avatars.githubusercontent.com/u/2104321?v=4)](https://github.com/QWp6t "QWp6t (1 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/livy-plumbing-normalize-links/health.svg)

```
[![Health](https://phpackages.com/badges/livy-plumbing-normalize-links/health.svg)](https://phpackages.com/packages/livy-plumbing-normalize-links)
```

###  Alternatives

[reactivex/rxphp

Reactive extensions for php.

1.7k3.3M55](/packages/reactivex-rxphp)[spatie/php-cloneable

A trait that allows you to clone readonly properties in PHP 8.1

981.4M18](/packages/spatie-php-cloneable)[igorw/event-source

A PHP 5.3 library for creating an EventSource stream.

10489.4k2](/packages/igorw-event-source)[robtimus/multipart

A library to support creating (streaming) multiparts

151.1M18](/packages/robtimus-multipart)[geocoder-php/mapbox-provider

Geocoder Mapbox adapter

131.1M2](/packages/geocoder-php-mapbox-provider)

PHPackages © 2026

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