Version Description
- Added option ignore links by classes
- Added option skip pages and posts by id
- Fixed bug checking internal links without protocol (starting //)
Download this release
Release Info
Developer | freelancephp |
Plugin | WP External Links (nofollow new tab seo) |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.3 to 2.2.0
- includes/admin/class-wpel-network-page.php +1 -1
- includes/admin/class-wpel-settings-page.php +1 -1
- includes/admin/network-fields/class-wpel-network-admin-fields.php +1 -1
- includes/admin/network-fields/class-wpel-network-fields.php +1 -1
- includes/admin/settings-fields/class-wpel-admin-fields.php +1 -1
- includes/admin/settings-fields/class-wpel-exceptions-fields.php +29 -1
- includes/admin/settings-fields/class-wpel-excluded-link-fields.php +1 -1
- includes/admin/settings-fields/class-wpel-external-link-fields.php +1 -1
- includes/admin/settings-fields/class-wpel-internal-link-fields.php +1 -1
- includes/admin/settings-fields/class-wpel-link-fields-base.php +1 -1
- includes/class-wpel-front-ignore.php +44 -2
- includes/class-wpel-front.php +8 -5
- includes/class-wpel-link.php +1 -1
- includes/class-wpel-plugin.php +1 -1
- includes/class-wpel-register-scripts.php +1 -1
- includes/class-wpel-template-tags.php +1 -1
- includes/class-wpel-update.php +1 -1
- includes/register-hooks/class-wpel-activation.php +1 -1
- includes/register-hooks/class-wpel-uninstall.php +1 -1
- readme.txt +18 -14
- templates/network-page/help-tabs/under-construction.php +1 -1
- templates/network-page/main.php +2 -2
- templates/network-page/tab-contents/network-admin-settings.php +1 -1
- templates/network-page/tab-contents/network-settings.php +1 -1
- templates/partials/nav-tabs.php +1 -1
- templates/partials/tab-contents/fields-default.php +1 -1
- templates/partials/tab-contents/support.php +1 -1
- templates/requirements-notice.php +1 -1
- templates/settings-page/help-tabs/data-attributes.php +1 -1
- templates/settings-page/help-tabs/under-construction.php +1 -1
- templates/settings-page/main.php +1 -1
- templates/settings-page/tab-contents/admin.php +1 -1
- templates/settings-page/tab-contents/exceptions.php +1 -1
- templates/settings-page/tab-contents/excluded-links.php +1 -1
- templates/settings-page/tab-contents/external-links.php +1 -1
- templates/settings-page/tab-contents/internal-links.php +1 -1
- wp-external-links.php +2 -2
includes/admin/class-wpel-network-page.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/class-wpel-settings-page.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/network-fields/class-wpel-network-admin-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/network-fields/class-wpel-network-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/settings-fields/class-wpel-admin-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/settings-fields/class-wpel-exceptions-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
@@ -42,6 +42,12 @@ final class WPEL_Exceptions_Fields extends FWP_Settings_Section_Base_1x0x0
|
|
42 |
'class' => 'js-wpel-apply-child wpel-hidden wpel-no-label',
|
43 |
'default_value' => '1',
|
44 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
'subdomains_as_internal_links' => array(
|
46 |
'label' => __( 'Make subdomains internal:', 'wp-external-links' ),
|
47 |
),
|
@@ -112,6 +118,28 @@ final class WPEL_Exceptions_Fields extends FWP_Settings_Section_Base_1x0x0
|
|
112 |
);
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
protected function show_subdomains_as_internal_links( array $args )
|
116 |
{
|
117 |
$this->get_html_fields()->check_with_label(
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
42 |
'class' => 'js-wpel-apply-child wpel-hidden wpel-no-label',
|
43 |
'default_value' => '1',
|
44 |
),
|
45 |
+
'skip_post_ids' => array(
|
46 |
+
'label' => __( 'Skip pages or posts (id\'s):', 'wp-external-links' ),
|
47 |
+
),
|
48 |
+
'ignore_classes' => array(
|
49 |
+
'label' => __( 'Ignore links by class:', 'wp-external-links' ),
|
50 |
+
),
|
51 |
'subdomains_as_internal_links' => array(
|
52 |
'label' => __( 'Make subdomains internal:', 'wp-external-links' ),
|
53 |
),
|
118 |
);
|
119 |
}
|
120 |
|
121 |
+
protected function show_skip_post_ids( array $args )
|
122 |
+
{
|
123 |
+
$this->get_html_fields()->text( $args[ 'key' ], array(
|
124 |
+
'class' => 'regular-text',
|
125 |
+
) );
|
126 |
+
|
127 |
+
echo '<p class="description">'
|
128 |
+
. __( 'Separate page- / post-id\'s by comma.', 'wp-external-links' )
|
129 |
+
.'</p>';
|
130 |
+
}
|
131 |
+
|
132 |
+
protected function show_ignore_classes( array $args )
|
133 |
+
{
|
134 |
+
$this->get_html_fields()->text( $args[ 'key' ], array(
|
135 |
+
'class' => 'regular-text',
|
136 |
+
) );
|
137 |
+
|
138 |
+
echo '<p class="description">'
|
139 |
+
. __( 'Separate classes by comma.', 'wp-external-links' )
|
140 |
+
.'</p>';
|
141 |
+
}
|
142 |
+
|
143 |
protected function show_subdomains_as_internal_links( array $args )
|
144 |
{
|
145 |
$this->get_html_fields()->check_with_label(
|
includes/admin/settings-fields/class-wpel-excluded-link-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/settings-fields/class-wpel-external-link-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/settings-fields/class-wpel-internal-link-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/admin/settings-fields/class-wpel-link-fields-base.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/class-wpel-front-ignore.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
@@ -44,11 +44,34 @@ final class WPEL_Front_Ignore extends WPRun_Base_1x0x0
|
|
44 |
return $this->settings_page->get_option_value( $key, $type );
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
/**
|
48 |
* Action for "wpel_before_apply_link"
|
49 |
* @param WPEL_Link $link
|
50 |
*/
|
51 |
-
protected function
|
52 |
{
|
53 |
// ignore mailto links
|
54 |
if ( $this->opt( 'ignore_mailto_links' ) && $link->is_mailto() ) {
|
@@ -59,6 +82,25 @@ final class WPEL_Front_Ignore extends WPRun_Base_1x0x0
|
|
59 |
if ( $link->has_attr_value( 'class', 'ab-item' ) ) {
|
60 |
$link->set_ignore();
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
/**
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
44 |
return $this->settings_page->get_option_value( $key, $type );
|
45 |
}
|
46 |
|
47 |
+
/**
|
48 |
+
* Skip complete pages
|
49 |
+
* @return boolean
|
50 |
+
*/
|
51 |
+
protected function filter_wpel_apply_settings()
|
52 |
+
{
|
53 |
+
if ( ! is_single() && ! is_page() ) {
|
54 |
+
return true;
|
55 |
+
}
|
56 |
+
|
57 |
+
$current_post_id = get_queried_object_id();
|
58 |
+
$skip_post_ids = $this->opt( 'skip_post_ids', 'exceptions' );
|
59 |
+
$skip_post_ids_arr = explode( ',', $skip_post_ids );
|
60 |
+
|
61 |
+
foreach ( $skip_post_ids_arr as $post_id ) {
|
62 |
+
if ( intval( $post_id ) === $current_post_id ) {
|
63 |
+
return false;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
return true;
|
68 |
+
}
|
69 |
+
|
70 |
/**
|
71 |
* Action for "wpel_before_apply_link"
|
72 |
* @param WPEL_Link $link
|
73 |
*/
|
74 |
+
protected function action_wpel_before_apply_link_10000000000( WPEL_Link $link )
|
75 |
{
|
76 |
// ignore mailto links
|
77 |
if ( $this->opt( 'ignore_mailto_links' ) && $link->is_mailto() ) {
|
82 |
if ( $link->has_attr_value( 'class', 'ab-item' ) ) {
|
83 |
$link->set_ignore();
|
84 |
}
|
85 |
+
|
86 |
+
// ignore links containing ignored classes
|
87 |
+
if ( $this->has_ignore_class( $link ) ) {
|
88 |
+
$link->set_ignore();
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
private function has_ignore_class( WPEL_Link $link )
|
93 |
+
{
|
94 |
+
$ignore_classes = $this->opt( 'ignore_classes', 'exceptions' );
|
95 |
+
$ignore_classes_arr = explode( ',', $ignore_classes );
|
96 |
+
|
97 |
+
foreach ( $ignore_classes_arr as $ignore_class ) {
|
98 |
+
if ( $link->has_attr_value( 'class', trim( $ignore_class ) ) ) {
|
99 |
+
return true;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
return false;
|
104 |
}
|
105 |
|
106 |
/**
|
includes/class-wpel-front.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
@@ -343,8 +343,8 @@ final class WPEL_Front extends WPRun_Base_1x0x0
|
|
343 |
}
|
344 |
|
345 |
foreach ( $include_urls_arr as $include_url ) {
|
346 |
-
|
347 |
-
|
348 |
}
|
349 |
}
|
350 |
|
@@ -378,7 +378,7 @@ final class WPEL_Front extends WPRun_Base_1x0x0
|
|
378 |
|
379 |
foreach ( $exclude_urls_arr as $exclude_url ) {
|
380 |
if ( false !== strpos( $url, $exclude_url ) ) {
|
381 |
-
|
382 |
}
|
383 |
}
|
384 |
|
@@ -401,7 +401,10 @@ final class WPEL_Front extends WPRun_Base_1x0x0
|
|
401 |
}
|
402 |
|
403 |
// is internal
|
404 |
-
|
|
|
|
|
|
|
405 |
|| false !== strpos( $url, home_url( '', 'https' ) ) ) {
|
406 |
return true;
|
407 |
}
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
343 |
}
|
344 |
|
345 |
foreach ( $include_urls_arr as $include_url ) {
|
346 |
+
if ( false !== strpos( $url, $include_url ) ) {
|
347 |
+
return true;
|
348 |
}
|
349 |
}
|
350 |
|
378 |
|
379 |
foreach ( $exclude_urls_arr as $exclude_url ) {
|
380 |
if ( false !== strpos( $url, $exclude_url ) ) {
|
381 |
+
return true;
|
382 |
}
|
383 |
}
|
384 |
|
401 |
}
|
402 |
|
403 |
// is internal
|
404 |
+
$url_without_protocol = substr( home_url( '', 'http' ), 5 ); // strip "http:"
|
405 |
+
|
406 |
+
if ( false !== strpos( $url, $url_without_protocol )
|
407 |
+
|| false !== strpos( $url, home_url( '' ) )
|
408 |
|| false !== strpos( $url, home_url( '', 'https' ) ) ) {
|
409 |
return true;
|
410 |
}
|
includes/class-wpel-link.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
*
|
8 |
* @package WPEL
|
9 |
* @category WordPress Plugin
|
10 |
-
* @version 2.
|
11 |
* @author Victor Villaverde Laan
|
12 |
* @link http://www.finewebdev.com
|
13 |
* @link https://github.com/freelancephp/WP-External-Links
|
7 |
*
|
8 |
* @package WPEL
|
9 |
* @category WordPress Plugin
|
10 |
+
* @version 2.2.0
|
11 |
* @author Victor Villaverde Laan
|
12 |
* @link http://www.finewebdev.com
|
13 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/class-wpel-plugin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/class-wpel-register-scripts.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/class-wpel-template-tags.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/class-wpel-update.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/register-hooks/class-wpel-activation.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
includes/register-hooks/class-wpel-uninstall.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
readme.txt
CHANGED
@@ -1,34 +1,35 @@
|
|
1 |
=== WP External Links (nofollow new tab seo) ===
|
2 |
Contributors: freelancephp
|
3 |
-
Tags: links, new window, new tab, external links, nofollow, follow, seo, noopener, noreferrer, internal links,
|
4 |
Requires at least: 4.2.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 2.
|
7 |
|
8 |
-
|
9 |
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
|
15 |
> <strong>=== NEW: Version 2 ===</strong><br>
|
16 |
> WPEL plugin was completely rebuilt and has lots of new features, like "noopener", font icons, internal links options and WPMU settings.
|
17 |
|
18 |
= Features =
|
|
|
19 |
* Open links in new window or tab
|
20 |
* Add "follow" or "nofollow"
|
21 |
* Add "noopener" and "noreferrer" (for security)
|
22 |
* Add link icons (font icons: font awesome, dashicons)
|
23 |
* Set other attributes like title and CSS classes
|
24 |
-
* Scan posts, comments, widgets
|
25 |
-
*
|
26 |
|
27 |
= And more... =
|
28 |
* Network Settings (WPMU support)
|
29 |
* Use template tag to apply plugin settings on specific contents
|
30 |
* Set data-attribute to change how individual links will be treated
|
31 |
-
* Use
|
32 |
|
33 |
= Easy to use =
|
34 |
After activating you can set all options for external and internal links on the plugins admin page.
|
@@ -76,8 +77,9 @@ version of this plugin.
|
|
76 |
|
77 |
= I want certain posts or pages to be ignored by the plugin. How? =
|
78 |
|
79 |
-
|
80 |
|
|
|
81 |
`add_action( 'wpel_apply_settings', function () {
|
82 |
global $post;
|
83 |
$ignored_post_ids = array( 1, 2, 4 );
|
@@ -93,8 +95,9 @@ Using this filter you can ignore any request, like certain category, archive etc
|
|
93 |
|
94 |
= I want specific links to be ignored by the plugin. How? =
|
95 |
|
96 |
-
|
97 |
|
|
|
98 |
`add_action( 'wpel_before_apply_link', function ( $link ) {
|
99 |
// ignore links with class "some-cls"
|
100 |
if ( $link->has_attr_value( 'class', 'some-cls' ) ) {
|
@@ -124,7 +127,6 @@ Create redirect by using the `wpel_link` action. Add some code to functions.php
|
|
124 |
By adding this JavaScript code to your site:
|
125 |
|
126 |
`jQuery(function ($) {
|
127 |
-
|
128 |
$('a[data-wpel-link="external"]').click(function (e) {
|
129 |
// open link in popup window
|
130 |
window.open($(this).attr('href'), '_blank', 'width=800, height=600');
|
@@ -133,7 +135,6 @@ By adding this JavaScript code to your site:
|
|
133 |
e.preventDefault();
|
134 |
e.stopImmediatePropagation();
|
135 |
});
|
136 |
-
|
137 |
});`
|
138 |
|
139 |
See more information on the [window.open() method](http://www.w3schools.com/jsref/met_win_open.asp).
|
@@ -143,7 +144,6 @@ See more information on the [window.open() method](http://www.w3schools.com/jsre
|
|
143 |
Add this JavaScript code to your site:
|
144 |
|
145 |
`jQuery(function ($) {
|
146 |
-
|
147 |
$('a[data-wpel-link="external"]').click(function (e) {
|
148 |
if (!confirm('Are you sure you want to open this link?')) {
|
149 |
// cancelled
|
@@ -151,7 +151,6 @@ Add this JavaScript code to your site:
|
|
151 |
e.stopImmediatePropagation();
|
152 |
}
|
153 |
});
|
154 |
-
|
155 |
});`
|
156 |
|
157 |
= How to open f.e. PDF files in a new window? =
|
@@ -257,6 +256,11 @@ See [FAQ](https://wordpress.org/plugins/wp-external-links/faq/) for more info.
|
|
257 |
|
258 |
== Changelog ==
|
259 |
|
|
|
|
|
|
|
|
|
|
|
260 |
= 2.1.3 =
|
261 |
* Commit error
|
262 |
|
1 |
=== WP External Links (nofollow new tab seo) ===
|
2 |
Contributors: freelancephp
|
3 |
+
Tags: links, new window, new tab, external links, nofollow, follow, seo, noopener, noreferrer, internal links, icon, target, _blank, wpmu
|
4 |
Requires at least: 4.2.0
|
5 |
+
Tested up to: 4.8.3
|
6 |
+
Stable tag: 2.2.0
|
7 |
|
8 |
+
Manage external and internal links: open in new window or tab, add "nofollow", "noopener", font icons and more. SEO friendly.
|
9 |
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Manage external and internal links on your site.
|
14 |
|
15 |
> <strong>=== NEW: Version 2 ===</strong><br>
|
16 |
> WPEL plugin was completely rebuilt and has lots of new features, like "noopener", font icons, internal links options and WPMU settings.
|
17 |
|
18 |
= Features =
|
19 |
+
* Manage external and internal links
|
20 |
* Open links in new window or tab
|
21 |
* Add "follow" or "nofollow"
|
22 |
* Add "noopener" and "noreferrer" (for security)
|
23 |
* Add link icons (font icons: font awesome, dashicons)
|
24 |
* Set other attributes like title and CSS classes
|
25 |
+
* Scan complete page (or just posts, comments, widgets)
|
26 |
+
* SEO friendly
|
27 |
|
28 |
= And more... =
|
29 |
* Network Settings (WPMU support)
|
30 |
* Use template tag to apply plugin settings on specific contents
|
31 |
* Set data-attribute to change how individual links will be treated
|
32 |
+
* Use built-in actions and filters to implement your specific needs
|
33 |
|
34 |
= Easy to use =
|
35 |
After activating you can set all options for external and internal links on the plugins admin page.
|
77 |
|
78 |
= I want certain posts or pages to be ignored by the plugin. How? =
|
79 |
|
80 |
+
Just use the option "Skip pages or posts" under the tab "Exceptions".
|
81 |
|
82 |
+
For a more custom approach use the action `wpel_apply_settings`:
|
83 |
`add_action( 'wpel_apply_settings', function () {
|
84 |
global $post;
|
85 |
$ignored_post_ids = array( 1, 2, 4 );
|
95 |
|
96 |
= I want specific links to be ignored by the plugin. How? =
|
97 |
|
98 |
+
There's an option for ignoring links containing a certain class (under tab "Exceptions").
|
99 |
|
100 |
+
For a more flexible check on ignoring links you could use the filter `wpel_before_apply_link`:
|
101 |
`add_action( 'wpel_before_apply_link', function ( $link ) {
|
102 |
// ignore links with class "some-cls"
|
103 |
if ( $link->has_attr_value( 'class', 'some-cls' ) ) {
|
127 |
By adding this JavaScript code to your site:
|
128 |
|
129 |
`jQuery(function ($) {
|
|
|
130 |
$('a[data-wpel-link="external"]').click(function (e) {
|
131 |
// open link in popup window
|
132 |
window.open($(this).attr('href'), '_blank', 'width=800, height=600');
|
135 |
e.preventDefault();
|
136 |
e.stopImmediatePropagation();
|
137 |
});
|
|
|
138 |
});`
|
139 |
|
140 |
See more information on the [window.open() method](http://www.w3schools.com/jsref/met_win_open.asp).
|
144 |
Add this JavaScript code to your site:
|
145 |
|
146 |
`jQuery(function ($) {
|
|
|
147 |
$('a[data-wpel-link="external"]').click(function (e) {
|
148 |
if (!confirm('Are you sure you want to open this link?')) {
|
149 |
// cancelled
|
151 |
e.stopImmediatePropagation();
|
152 |
}
|
153 |
});
|
|
|
154 |
});`
|
155 |
|
156 |
= How to open f.e. PDF files in a new window? =
|
256 |
|
257 |
== Changelog ==
|
258 |
|
259 |
+
= 2.2.0 =
|
260 |
+
* Added option ignore links by classes
|
261 |
+
* Added option skip pages and posts by id
|
262 |
+
* Fixed bug checking internal links without protocol (starting //)
|
263 |
+
|
264 |
= 2.1.3 =
|
265 |
* Commit error
|
266 |
|
templates/network-page/help-tabs/under-construction.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/network-page/main.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
@@ -40,7 +40,7 @@
|
|
40 |
}
|
41 |
?>
|
42 |
|
43 |
-
<form method="post" action="<?php echo $action_url; ?>">
|
44 |
<?php
|
45 |
wp_referer_field();
|
46 |
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
40 |
}
|
41 |
?>
|
42 |
|
43 |
+
<form method="post" action="<?php echo $action_url; ?>" class="wpel-hidden">
|
44 |
<?php
|
45 |
wp_referer_field();
|
46 |
|
templates/network-page/tab-contents/network-admin-settings.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/network-page/tab-contents/network-settings.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/partials/nav-tabs.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/partials/tab-contents/fields-default.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/partials/tab-contents/support.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/requirements-notice.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/help-tabs/data-attributes.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/help-tabs/under-construction.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/main.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/tab-contents/admin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/tab-contents/exceptions.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/tab-contents/excluded-links.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/tab-contents/external-links.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
templates/settings-page/tab-contents/internal-links.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link http://www.finewebdev.com
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
wp-external-links.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
-
* @version 2.
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link https://wordpress.org/plugins/wp-external-links/
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
@@ -12,7 +12,7 @@
|
|
12 |
*
|
13 |
* @wordpress-plugin
|
14 |
* Plugin Name: WP External Links
|
15 |
-
* Version: 2.
|
16 |
* Plugin URI: https://wordpress.org/plugins/wp-external-links/
|
17 |
* Description: Open external links in a new tab or window, adding "nofollow" and "noopener", set font icon, SEO friendly options and more.
|
18 |
* Author: Victor Villaverde Laan
|
4 |
*
|
5 |
* @package WPEL
|
6 |
* @category WordPress Plugin
|
7 |
+
* @version 2.2.0
|
8 |
* @author Victor Villaverde Laan
|
9 |
* @link https://wordpress.org/plugins/wp-external-links/
|
10 |
* @link https://github.com/freelancephp/WP-External-Links
|
12 |
*
|
13 |
* @wordpress-plugin
|
14 |
* Plugin Name: WP External Links
|
15 |
+
* Version: 2.2.0
|
16 |
* Plugin URI: https://wordpress.org/plugins/wp-external-links/
|
17 |
* Description: Open external links in a new tab or window, adding "nofollow" and "noopener", set font icon, SEO friendly options and more.
|
18 |
* Author: Victor Villaverde Laan
|