Hum

from 0$

Hum is a WP Plugin Package from the Open Source WP Plugins range Personal URL shortener for WordPress


For more information about a tailored WP Plugin Package like Hum please contact us directly.

Hum is a personal URL shortener for WordPress, designed to provide short URLs to your personal content, both hosted on WordPress and elsewhere. For example, rather than a long URL for a WordPress post such as http://willnorris.com/2011/01/hum-personal-url-shortener-wordpress, you could have a short URL like http://willnorris.com/b/FJ. Additionally, if you have a custom domain for short URLs, you can shorten things further like http://wjn.me/b/FJ. Once the plugin is enabled, the shortlink for a page or post can be found in the “Shortlink” item in the WordPress Admin Bar.

WordPress post IDs are shortened using the NewBase60 encoding scheme which is specifically optimized for brevity and readability, with built-in error correction for commonly confused characters like ‘1’, ‘l’, and ‘I’.

Hum is not designed as a general purpose URL shortener along the lines of http://bit.ly or http://goo.gl. Rather, it is specifically intended as a personal shortener for your own content.

Read more about the reasoning for a personal URL shortener at Tantek Celik‘s page for Whistle, which served as the inspiration for Hum.

Developer Documentation

Adding your Amazon Affiliate ID

If you’d like to include your Amazone Affiliate ID in the /i/ redirect URLs, implement the amazon_affiliate_id filter. For example:

add_filter('amazon_affiliate_id', create_function('', 'return "willnorris-20";'));

Additional Local Types

Out of the box, Hum only registers the b, t, a and p prefix to be served locally by WordPress. If you would like to register additional prefixes, implement the hum_local_types filter. For example, to include ‘p’ as well for photos:

function myplugin_hum_local_types( $types ) {
  $types[] = 'p';
  return $types;
}
add_filter('hum_local_types', 'myplugin_hum_local_types');

This will tell Hum to serve any /p/{id} URLs from WordPress. Additionally, you’ll want to instruct Hum to use your prefix for that particular content type. Here, we’re registering ‘p’ which is normally used for photos.

function myplugin_hum_type_prefix( $prefix, $post_id ) {
  $post = get_post( $post_id );

  if ( $post->post_type == 'attachment' &&
       strpos($post->post_mime_type, 'image') === 0 ) {
    $prefix = 'p';
  }

  return $prefix;
}
add_filter('hum_type_prefix', 'myplugin_hum_type_prefix', 10, 2);

Simple Redirect

You can redirect all traffic for a prefix using a single line of PHP my implementing the hum_redirect_base_{type} filter where {type} is the prefix to redirect. For example, I redirect all /w/ URLs to wiki.willnorris.com using:

add_filter('hum_redirect_base_w',
  create_function('', 'return "http://wiki.willnorris.com/";'));

Download & install the zip archive

The plugin package installer can be downloaded from the WP2E project tab called “code”.

1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.

2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.

3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.

Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.

Hum

typePlugin
version1.2.5
descriptionPersonal URL shortener for WordPress