Replaces links to the currently seen page.
Changes <a>
elements pointing to the currently seen page by removing the href
attribute and adding a descriptive title
.
Compatible with most themes. Tested with TwentyTen
Example:
If you are on the page /about/
<a href='http://example.com/about/'>About</a>
will be converted to
<a title='You are here.' class='rrl current_page_item'>About</a>
and
<link rel='author' href='/about/'>
will be removed.
All changes apply to GET
requests only.
Send me your bug reports and suggestions via my contact page.
Upload the directory to your plugin directory.
Activate the plugin through the ‘Plugins’ menu in WordPress.
The current settings are chosen for compatibility.
To use other settings, you probably have to alter your theme.
You may alter the settings with a filter on rrl_settings
in your functions.php
.
Example:
function change_rrl_settings( $settings ) { $settings['class'] = 'my_own_class'; $settings['title'] = 'Here be dragons'; $settings['replace_a'] = 'span'; return $settings; } add_filter( 'rrl_settings', 'change_rrl_settings', 10, 1 );
Same as above, set strip_server_prefix_on_all_links
to FALSE
:
function rrl_prevent_server_prefix( $settings ) { $settings['strip_server_prefix_on_all_links'] = FALSE; return $settings; } add_filter( 'rrl_settings', 'rrl_prevent_server_prefix', 10, 1);
acronym
and abbr
will not be matched anymore.strip_server_prefix_on_all_links
. Defaults to TRUE
. Set this to FALSE
to keep absolute URIs. See the FAQ.<link rel=canonical>
. Thanks to eviluody for testing!<linkrel=canonical>
.<a rel=bookmark>
, the »permalink« in TwentyTen.