/ Published in: PHP
Configure settings for all external links on your site.
Features:
* Open external links in new window or tab
* Add "nofollow"
* Set link title
* Set link icon
* Set classes (for your own styling)
* Set no-icon class
* SEO friendly
Features:
* Open external links in new window or tab
* Add "nofollow"
* Set link title
* Set link icon
* Set classes (for your own styling)
* Set no-icon class
* SEO friendly
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Plugin Name: WP External Links Plugin URI: http://www.freelancephp.net/wp-external-links-plugin Description: Open external links in a new window/tab, add "external" / "nofollow" to rel-attribute, set icon, XHTML strict, SEO friendly... Author: Victor Villaverde Laan Version: 1.41 Author URI: http://www.freelancephp.net License: Dual licensed under the MIT and GPL licenses */ // plugin version // plugin key (used as translation domain, option_group, page_slug etc) // plugin file // check plugin compatibility if ( isset( $wp_version ) AND version_compare( preg_replace( '/-.*$/', '', $wp_version ), '3.0', '>=' ) // include classes require_once( 'includes/wp-plugin-dev-classes/class-wp-meta-box-page.php' ); require_once( 'includes/wp-plugin-dev-classes/class-wp-option-forms.php' ); require_once( 'includes/class-admin-external-links.php' ); require_once( 'includes/class-wp-external-links.php' ); // create WP_External_Links instance $WP_External_Links = new WP_External_Links(); } else { // set error message function wp_external_links_error_notice() { echo '<div class="error">' . __( '<p>Warning - <strong>WP External Links Plugin</strong> requires PHP 5.2+ and WP 3.0+.' . '<br/>Please upgrade your configuration or use an older version of this plugin. ' . 'Disable the plugin to remove this message.</p>', WP_EXTERNAL_LINKS_KEY ) . '</div>'; } add_action( 'admin_notices', 'wp_external_links_error_notice' ); } /* ommit PHP closing tag, to prevent unwanted whitespace at the end of the parts generated by the included files */
URL: http://www.freelancephp.net/wp-external-links-plugin/