Title: WAJ Links
Author: waughjai
Published: <strong>November 12, 2018</strong>
Last modified: May 8, 2019

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/waj-links/assets/icon.svg?rev=2010178)

# WAJ Links

 By [waughjai](https://profiles.wordpress.org/waughjai/)

[Download](https://downloads.wordpress.org/plugin/waj-links.1.3.0.zip)

 * [Details](https://ido.wordpress.org/plugins/waj-links/#description)
 * [Reviews](https://ido.wordpress.org/plugins/waj-links/#reviews)
 *  [Installation](https://ido.wordpress.org/plugins/waj-links/#installation)
 * [Development](https://ido.wordpress.org/plugins/waj-links/#developers)

 [Support](https://wordpress.org/support/plugin/waj-links/)

## Description

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

### 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 & 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&second_parameter=second_value ) * an “external” attribute, which, 
when set to “true”, automatically adds HTML to make the link open in a new tab &
protect it from hacking. ( See https://www.jitbit.com/alexblog/256-targetblank—the-
most-underestimated-vulnerability-ever/ for mo’ info on security concerns ).

### 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

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

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 &
shortcode.

### 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 & shortcode.

### 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 & optional attributes added the same way as regular Link
class.

### 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 & optional
attributes added the same way as regular Link class.

### 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

 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&
    used as strings, or you can call getHTML() to get HTML code as string.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“WAJ Links” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ waughjai ](https://profiles.wordpress.org/waughjai/)

[Translate “WAJ Links” into your language.](https://translate.wordpress.org/projects/wp-plugins/waj-links)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/waj-links/), check 
out the [SVN repository](https://plugins.svn.wordpress.org/waj-links/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/waj-links/) by [RSS](https://plugins.trac.wordpress.org/log/waj-links/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.3

 * Make shortcodes safely break.
 * Fix mail & phone links so that content doesn’t take priority o’er email/phone
   attributes, causing [mail-link email=”waughjai@gmail.com”]Mail Me![/mail-link]
   to generate [Mail Me!](https://ido.wordpress.org/plugins/waj-links/Mail Me!?output_format=md)‘
   stead o’ the preferred [Mail Me!](https://ido.wordpress.org/plugins/waj-links/waughjai@gmail.com?output_format=md).
 * Allow mail link to use “mailto” attribute to set email, as well as “email” & 
   allow phone link to use “tel” attribute to set the phone #, as well as “phone”.
 * Change “id” attribute to “media-id” / “media_id” for media link so that the shortcode
   doesn’t block setting the link’s ID attribute.

#### 1.2

 * Add media link.

#### 1.1

 * Add phone link.

#### 1.0

 * Initial stable version.

## Meta

 *  Version **1.3.0**
 *  Last updated **7 years ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 4.9.8 or higher **
 *  Tested up to **5.2.24**
 *  PHP version ** 7.0 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/waj-links/)
 * Tags
 * [html](https://ido.wordpress.org/plugins/tags/html/)[link](https://ido.wordpress.org/plugins/tags/link/)
 *  [Advanced View](https://ido.wordpress.org/plugins/waj-links/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/waj-links/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/waj-links/reviews/)

## Contributors

 *   [ waughjai ](https://profiles.wordpress.org/waughjai/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/waj-links/)