PHPackages                             waughj/wordpress-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. waughj/wordpress-links

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

waughj/wordpress-links
======================

WordPress plugin for easy generation o' links.

v1.0.2(6y ago)054AGPL-3.0-or-laterPHPPHP &gt;=7.2

Since May 30Pushed 6y agoCompare

[ Source](https://github.com/waughjai/wordpress-links)[ Packagist](https://packagist.org/packages/waughj/wordpress-links)[ RSS](/packages/waughj-wordpress-links/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (9)Versions (4)Used By (0)

WordPress Links
===============

[](#wordpress-links)

Way to mo'-easily create links o' various types in content through PHP &amp; shortcodes.

Description
-----------

[](#description)

This plugin includes 6 types o' shortcodes / PHP classes:

### Link

[](#link)

Shortcode: \[link href="url"\]content\[/link\] PHP Class: new WaughJ\\HTMLLink\\HTMLLink( $href, $content, $other\_attributes );

General link where the link href given is used directly as the href. The backbone o' all the other link types.

Content, when put 'tween opening &amp; closing tags, can be a shortcode o' its own, which will be interpreted, too. When used as a PHP class, you can push any object that can be used as a string as content, including other HTML generators.

Valid attributes include all valid HTML5 attributes for the a tag, as well as...

- an "anchor" attribute that adds an anchor to the href ( the part after the # ).
- a "parameters" attribute that adds GET parameters to the href ( i.e. ?first\_parameter=second\_value&amp;second\_parameter=second\_value )
- an "external" attribute, which, when set to "true", automatically adds HTML to make the link open in a new tab &amp; protect it from hacking. ( See  for mo' info on security concerns ).

### Mail-Link

[](#mail-link)

Shortcode: \[mail-link\]email\[/mail-link\] or \[mail-link email="email"\]Email Me.\[/mail-link\] PHP Class: new WaughJ\\HTMLMailLink\\HTMLMailLink( $email, $other\_attributes );

Generates mailto link. If just email given, content automatically set to email.

Valid attributes include "value" for content ( for the direct PHP use ). all valid HTML5 attributes for the a tag, as well as the external attribute mentioned under Link.

### Phone-Link

[](#phone-link)

Shortcode: \[phone-link\]phone number\[/phone-link\] or \[phone-link tel="phone"\]Call us now!\[/phone-link\] PHP Class: new WaughJ\\HTMLPhoneLink\\HTMLPhoneLink( $phone\_number, $other\_attributes );

Generates tel link. If just phone # is given, content automatically set to phone #.

Valid attributes include "value" for content ( for the direct PHP use ). all valid HTML5 attributes for the a tag, as well as the external attribute mentioned under Link.

### Post-Link

[](#post-link)

Shortcode: \[post-link slug="post-slug"\] or \[post-link slug="post-slug" post\_type="specific-post-type"\] \[post-link post\_id="post-id"\]Read this post\[/post-link\] PHP Class: new WaughJ\\WPPostLink\\WPPostLink( $attributes );

Generates a link to a post, based on slug or post\_id, or, if using the PHP class, the post object itself under "post".

In addition, you can add all the attributes you can for the regular Link class &amp; shortcode.

### Home-Link

[](#home-link)

Shortcode: \[home-link\] or \[home-link\]Visit our home page.\[/home-link\] PHP Class: new WaughJ\\WPHomeLink\\WPHomeLink( $attributes );

Automatically generates link to WordPress front page. Content that represents link defaults to name o' front page. All alternative attributes done the same as regular Link class &amp; shortcode.

### Category Link

[](#category-link)

Shortcode: \[category-link slug="category-slug"\] or \[category-link category\_id="category-id"\]Link content\[/category-link\] PHP Class: new WaughJ\\WPCategoryLink\\WPCategoryLink( $attributes );

Automatically generates link to category page. Use slug or category\_id attributes to get category. Content &amp; optional attributes added the same way as regular Link class.

### Tag Link

[](#tag-link)

Shortcode: \[tag-link slug="category-slug"\] or \[tag-link slug="category-slug"\]Link content\[/tag-link\] PHP Class: new WaughJ\\WPTagLink\\WPTagLink( $attributes );

Automatically generates link to tag page. Use slug to get tag. Content &amp; optional attributes added the same way as regular Link class.

### Media Link

[](#media-link)

Shortcode: \[media-link media\_id=""\]Link content\[/media-link\] or \[media-link media-id=""\]Link content\[/media-link\] or \[media-link media-id="" value="Link content"\] PHP Class: new WaughJ\\WPMediaLink\\WPMediaLink( $id, $content, $attributes );

Automatically generates link to media item. Content must be set or shortcode won't work. Shortcode content can be put as content, too. For example, if WAJ Images is installed, you can do the common technique o' an image link with:

\[media-link media-id="1"\]\[upload-image id="1"\]\[/media-link\]

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

[](#installation)

1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Links can be added using shortcode in WordPress editors or directly in PHP by using instances o' classes. Instances o' classes can be automatically casted into strings &amp; used as strings, or you can call getHTML() to get HTML code as string.

Changelog
---------

[](#changelog)

### 1.0.1

[](#101)

- Update TestHashItem dependency

### 1.0.1

[](#101-1)

- Initial stable version.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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 ~13 days

Total

3

Last Release

2509d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.0.1PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/371f8a877b768ffd61b3dd2ce379630dd1fd685c3009dce955971d247ccc9521?d=identicon)[waughj](/maintainers/waughj)

---

Tags

pluginwordpresslinks

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waughj-wordpress-links/health.svg)

```
[![Health](https://phpackages.com/badges/waughj-wordpress-links/health.svg)](https://phpackages.com/packages/waughj-wordpress-links)
```

###  Alternatives

[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)[webdevstudios/cmb2-attached-posts

Custom field for CMB2 for creating post relationships.

13565.5k](/packages/webdevstudios-cmb2-attached-posts)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)[balbuf/composer-wp

Manage WordPress core, plugins, and themes with composer.

173.6k](/packages/balbuf-composer-wp)

PHPackages © 2026

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