(WordPress Plugin) Checks internal links between posts
PHP
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 5 commits ahead, 12 commits behind franz-josef-kaiser:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lang
AUTHORS
LICENSE.txt
admin_table.php
internal-links.php
readme.textile
readme.txt
screenshot-1.jpg

readme.textile

Internal Link Checker

Version: v1.1

> Updates available via the official wp.org plugin repository.

Adds a meta box to the post edit screen that shows all internal links from other posts/pages/post-types to the currently displayed post. This way you can easily check if you should fix links before deleting a post. There are no options needed. The plugin works out of the box – just activate!


Example

No examples needed – works out of the box.

How-to

By default, the plugin gets this columns from wp_posts table: ID, post_title, post_date, post_content, post_type.
And its Meta Box displays the following: ID, Title and Date.
In case you want to extend its functionality you can use the available hooks

Master filter

Used to modify the SQL query, add the meta box to other post types, add columns to the meta box and set the sortable ones


function internal_links_master_function( $args, $context )
{
switch ( $context )
{
# Modify the columns retrived from the database
case ‘sql’:
return array( ‘ID’, ‘post_title’, ‘post_date’, ‘post_content’, ‘post_excerpt’, ‘post_type’ );
break;
# Add Meta Box to other post types
case ‘metabox’:
return array( ‘post’, ‘page’ );
break;
# Add columns to the metabox
case ‘columns’:
$columns = array(
‘ID’ => ‘ID’
,‘post_title’ => ‘Título’
,‘post_date’ => ‘Fecha’
,‘post_type’ => ‘Tipo’
,‘post_excerpt’ => ‘Resumo’
);
return $columns;
break;
# Set Meta Box sortable columns
case ‘sortables’:
$sortable = array(
‘ID’ => array( ‘ID’, true )
,‘post_title’ => array( ‘post_date’, true )
,‘post_date’ => array( ‘post_date’, true )
,‘post_type’ => array( ‘post_type’, true )
);
return $sortable;
break;
}
return $args;
}

function internal_links_apply_filter()
{
add_filter( ‘internal_links_master_filter’, ‘internal_links_master_function’, 10, 2 );
}
add_action( ‘admin_init’, ‘internal_links_apply_filter’, 10 );

Modify posts per page

function posts_per_page_ilc($number) 
{
    return 8;
}
add_filter( 'internal_links_per_page', 'posts_per_page_ilc' );

Stylesheets

Not needed.

Languages

Translation ready.

Languages included:
EN/DE (Patrick Matsumura)
pt_BR/es_ES (Rodolfo Buaiz)

Authors

visit Franz Josef Kaiser at github | or get social at G+
visit Patrick Matsumura at github | or get social at G+
visit Rodolfo Buaiz at github | or get social at G+


Changelog

  • v0.1 First version
  • v0.1.1 Should now work with post titles & post slugs/names
  • v0.1.2 Meta box content now displays inside an unordered list
  • v0.1.2 Added screenshot, readme.txt for wp.org repo & fixed not echoing that there are no links
  • v0.1.3 Minor fixes
  • v0.2 Moved to a class, added translation files loading fn.
  • v0.2.1 Minor fixes, added translation – props patrickmatsumura (see authors file)
  • v0.2.2 Added authors file, added check for unique links
  • v0.2.4 Added markup & markup filter functions and a initial settings array for further extension
  • v0.2.5 Added auto-correction for li elements & container
  • v0.2.6 Added singular/plural translation strings. Grouped results by post type column.
  • v0.2.6.1 Reworked translation files.
  • v0.2.6.2 Avoids loading on every $_REQUEST. Now only loads on post.php in admin (post/page/cpt new/edit) screens
  • v0.2.6.3 Added mu-plugins directory for l10n lang files loading.
  • v0.2.6.4 Changed meta box title to “Internal Links” to not have long titles in screen options tab.
  • v0.2.6.5 Added wrapper function to call plugin data
  • v0.2.6.6 Moved Text Domain to plugin header comment for easier maintainance and transparency
  • v0.2.7 Added native WP admin UI table to the meta box
  • v0.2.7.1 Moved to admin edit post permalinks
  • v0.2.8 Added better update messages for plugin list screen
  • v0.2.9 Moved from a filter for the meta box to an action to override the output of the meta box content
  • v0.3 Language & Typo fixes. Final, stable 0.3 release.
  • v0.4 Now supports pagination for the meta box to take less space in the UI in cases where there are more than just a few links
  • v0.5 Now supports sorting by column
  • v0.5.1 Separate textdomain function
  • v0.5.2 Prepared SQL
  • v0.5.3 Alignment for code in repo
  • v0.5.4 Empty posts fix
  • v0.6 Major improvements in code length
  • v0.6.1 Shortened admin table class
  • v1.1 Fully tested and stable.