Open external links in a new window - Version 1.4

Version Description

  • 2019-08-26
  • WebFactory took over development
  • minor fixes
  • 40,000 installs; 178,750 downloads
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Open external links in a new window
Version 1.4
Comparing to
See all releases

Code changes from version 1.3.2 to 1.4

open-external-links-in-a-new-window-da_DK.mo DELETED
Binary file
open-external-links-in-a-new-window-da_DK.po DELETED
@@ -1,97 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Open external links in a new window\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-05-23 12:30+0100\n"
6
- "PO-Revision-Date: 2012-05-23 12:53+0100\n"
7
- "Last-Translator: Kristian Risager Larsen <translation@kezze.dk>\n"
8
- "Language-Team: Kristian Risager Larsen\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: Danish\n"
14
- "X-Poedit-Country: DENMARK\n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
- "X-Poedit-Basepath: .\n"
18
- "X-Poedit-Bookmarks: \n"
19
- "X-Poedit-SearchPath-0: .\n"
20
- "X-Textdomain-Support: yes"
21
-
22
- #: open-external-links-in-a-new-window.php:18
23
- #@ open-external-links-in-a-new-window
24
- msgid "Plugin: Open external links a new window."
25
- msgstr "Plugin: Åbn eksterne links i et nyt vindue."
26
-
27
- #: open-external-links-in-a-new-window.php:18
28
- #@ open-external-links-in-a-new-window
29
- msgid "Plugin by"
30
- msgstr "Plugin af"
31
-
32
- #: open-external-links-in-a-new-window.php:18
33
- #@ open-external-links-in-a-new-window
34
- msgid "Download it at"
35
- msgstr "Hent det fra"
36
-
37
- #: open-external-links-in-a-new-window.php:106
38
- #: open-external-links-in-a-new-window.php:113
39
- #@ open-external-links-in-a-new-window
40
- msgid "Open external links in a new window"
41
- msgstr "Åbn eksterne links i et nyt vindue."
42
-
43
- #: open-external-links-in-a-new-window.php:106
44
- #@ open-external-links-in-a-new-window
45
- msgid "External links"
46
- msgstr "Eksterne links"
47
-
48
- #: open-external-links-in-a-new-window.php:124
49
- #@ open-external-links-in-a-new-window
50
- msgid "Force links to open in a new window if they match:"
51
- msgstr "Tving links til at åbne i et nyt vindue, hvis de matcher:"
52
-
53
- #: open-external-links-in-a-new-window.php:127
54
- #@ open-external-links-in-a-new-window
55
- msgid "Ignore links, and do not open them in a new window, if they match: (Even if they start with http:// or https://)"
56
- msgstr "Ignorer links, og åbn dem ikke i et nyt vindue, hvis de matcher: (Også selvom de starter med http:// eller https://)"
57
-
58
- #: open-external-links-in-a-new-window.php:132
59
- #@ open-external-links-in-a-new-window
60
- msgid "Save changes"
61
- msgstr "Gem ændringer"
62
-
63
- #: open-external-links-in-a-new-window.php:118
64
- #@ open-external-links-in-a-new-window
65
- msgid "By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab."
66
- msgstr "Som udgangspunkt sørger dette plugin for at åbne alle eksterne links (dvs. links, der peger væk fra det nuværende værtsnavn) i et nyt vindue/tab."
67
-
68
- #: open-external-links-in-a-new-window.php:120
69
- #@ open-external-links-in-a-new-window
70
- msgid "You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window."
71
- msgstr "Du kan ændre dette ved at skrive regular expressions, som enten gennemtvinger at et matchende link skal åbne i et nyt vindue, eller ignorerer det matchende link."
72
-
73
- #: open-external-links-in-a-new-window.php:140
74
- #@ open-external-links-in-a-new-window
75
- msgid "http:// or https://"
76
- msgstr "http:// eller https://"
77
-
78
- #: open-external-links-in-a-new-window.php:152
79
- #@ default
80
- msgid "Settings"
81
- msgstr ""
82
-
83
- #: open-external-links-in-a-new-window.php:136
84
- #@ open-external-links-in-a-new-window
85
- msgid "The matches are prioritized in the following order:"
86
- msgstr "De matchende URL'er bliver prioriteret i den følgende rækkefølge:"
87
-
88
- #: open-external-links-in-a-new-window.php:138
89
- #@ open-external-links-in-a-new-window
90
- msgid "Ignored, matching URLs"
91
- msgstr "Ignorerede, matchende URL'er"
92
-
93
- #: open-external-links-in-a-new-window.php:139
94
- #@ open-external-links-in-a-new-window
95
- msgid "Forced, matching URLs"
96
- msgstr "Gennemtvungne, matchende URL'er"
97
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
open-external-links-in-a-new-window-lt_LT.mo DELETED
Binary file
open-external-links-in-a-new-window-lt_LT.po DELETED
@@ -1,95 +0,0 @@
1
- # Copyright (C) 2012 Open external links in a new window
2
- # This file is distributed under the same license as the Open external links in a new window package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Open external links in a new window 1.3\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/open-external-links-in-a-new-window\n"
7
- "POT-Creation-Date: 2012-05-23 18:24:41+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2012-05-25 14:05+0200\n"
12
- "Last-Translator: \n"
13
- "Language-Team: Host1Free\n"
14
- "X-Poedit-Language: Lithuanian\n"
15
- "X-Poedit-Country: Lithuania\n"
16
-
17
- #: open-external-links-in-a-new-window.php:18
18
- msgid "Plugin: Open external links a new window."
19
- msgstr "Papildinys: Atidaryti išorines nuorodas naujame lange."
20
-
21
- #: open-external-links-in-a-new-window.php:18
22
- msgid "Plugin by"
23
- msgstr "Papildinys sukurtas"
24
-
25
- #: open-external-links-in-a-new-window.php:18
26
- msgid "Download it at"
27
- msgstr "Parsisiųskite tai iš"
28
-
29
- #. #-#-#-#-# plugin.pot (Open external links in a new window 1.3) #-#-#-#-#
30
- #. Plugin Name of the plugin/theme
31
- #: open-external-links-in-a-new-window.php:106
32
- #: open-external-links-in-a-new-window.php:113
33
- msgid "Open external links in a new window"
34
- msgstr "Atidaryti išorines nuorodas naujame lange"
35
-
36
- #: open-external-links-in-a-new-window.php:106
37
- msgid "External links"
38
- msgstr "Išorinės nuorodos"
39
-
40
- #: open-external-links-in-a-new-window.php:118
41
- msgid "By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab."
42
- msgstr "Pagal numatytasias parinktis, šis papildinys padaro taip, kad visos išorinės nuorodos (pvz. nuorodos, kurios nurodo į kitus, negu dabartinis puslapis) atsidarytų naujame lange/kortelėje."
43
-
44
- #: open-external-links-in-a-new-window.php:120
45
- msgid "You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window."
46
- msgstr "Jūs galite pakeisti šią elgseną, įprastų išsireiškimų pagalbą, kurie priverčia langą atsidaryti naujame lange, arba šią parinktį ignoruoja."
47
-
48
- #: open-external-links-in-a-new-window.php:124
49
- msgid "Force links to open in a new window if they match:"
50
- msgstr "Priversti nuorodas atidaryti naujame lange, jeigu jos atitinka:"
51
-
52
- #: open-external-links-in-a-new-window.php:127
53
- msgid "Ignore links, and do not open them in a new window, if they match: (Even if they start with http:// or https://)"
54
- msgstr "Ignoruoti nuorodas ir neatidarinėti jų naujame lange, jeigu jos atitinka: (Net jeigu jos praisdeda http:// arba https://)"
55
-
56
- #: open-external-links-in-a-new-window.php:132
57
- msgid "Save changes"
58
- msgstr "Įrašyti pakeitimus"
59
-
60
- #: open-external-links-in-a-new-window.php:136
61
- msgid "The matches are prioritized in the following order:"
62
- msgstr "Atitinkams pirmenybė teikiama šia tvarka:"
63
-
64
- #: open-external-links-in-a-new-window.php:138
65
- msgid "Ignored, matching URLs"
66
- msgstr "Ignoruojamos, atitinkančios universaliosios nuorodos"
67
-
68
- #: open-external-links-in-a-new-window.php:139
69
- msgid "Forced, matching URLs"
70
- msgstr "Priverstinai atitinkančioms universaliosioms nuorodoms"
71
-
72
- #: open-external-links-in-a-new-window.php:140
73
- msgid "http:// or https://"
74
- msgstr "http:// arba https://"
75
-
76
- #: open-external-links-in-a-new-window.php:152
77
- msgid "Settings"
78
- msgstr "Nuostatos"
79
-
80
- #. Plugin URI of the plugin/theme
81
- msgid "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
82
- msgstr "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
83
-
84
- #. Description of the plugin/theme
85
- msgid "Opens all external links in a new window. XHTML Strict compliant and search engine optimized (SEO)."
86
- msgstr "Atidaro visas išorines nuorodas naujame naršyklės lange. Griežtai atitinkantis XHTML and paieškos sistemos optimizavimą (SEO)"
87
-
88
- #. Author of the plugin/theme
89
- msgid "Kristian Risager Larsen"
90
- msgstr "Kristian Risager Larsen"
91
-
92
- #. Author URI of the plugin/theme
93
- msgid "http://kezze.dk"
94
- msgstr "http://kezze.dk"
95
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
open-external-links-in-a-new-window-nl_NL.mo DELETED
Binary file
open-external-links-in-a-new-window-nl_NL.po DELETED
@@ -1,96 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Open external links in a new window\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-05-23 12:30+0100\n"
6
- "PO-Revision-Date: 2012-05-26 15:38+0100\n"
7
- "Last-Translator: Paul Staring <info@collectief-it.nl>\n"
8
- "Language-Team: Kristian Risager Larsen\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: Dutch\n"
14
- "X-Poedit-Country: NETHERLANDS\n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
- "X-Poedit-Basepath: .\n"
18
- "X-Textdomain-Support: yes\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
-
21
- #@ open-external-links-in-a-new-window
22
- #: open-external-links-in-a-new-window.php:18
23
- msgid "Plugin: Open external links a new window."
24
- msgstr "Plugin: Open externe links in een nieuw venster."
25
-
26
- #@ open-external-links-in-a-new-window
27
- #: open-external-links-in-a-new-window.php:18
28
- msgid "Plugin by"
29
- msgstr "Plugin door"
30
-
31
- #@ open-external-links-in-a-new-window
32
- #: open-external-links-in-a-new-window.php:18
33
- msgid "Download it at"
34
- msgstr "Download het van"
35
-
36
- #@ open-external-links-in-a-new-window
37
- #: open-external-links-in-a-new-window.php:106
38
- #: open-external-links-in-a-new-window.php:113
39
- msgid "Open external links in a new window"
40
- msgstr "Open externe links in een nieuw venster"
41
-
42
- #@ open-external-links-in-a-new-window
43
- #: open-external-links-in-a-new-window.php:106
44
- msgid "External links"
45
- msgstr "Externe links"
46
-
47
- #@ open-external-links-in-a-new-window
48
- #: open-external-links-in-a-new-window.php:124
49
- msgid "Force links to open in a new window if they match:"
50
- msgstr "Dwing links in een nieuw venster te openen, indien ze overeenkomen met:"
51
-
52
- #@ open-external-links-in-a-new-window
53
- #: open-external-links-in-a-new-window.php:127
54
- msgid "Ignore links, and do not open them in a new window, if they match: (Even if they start with http:// or https://)"
55
- msgstr "Negeer links en open ze niet in een nieuw venster, indien ze overeenkomen met: (Zelfs als ze beginnen met http:// of https://)"
56
-
57
- #@ open-external-links-in-a-new-window
58
- #: open-external-links-in-a-new-window.php:132
59
- msgid "Save changes"
60
- msgstr "Wijzigingen opslaan"
61
-
62
- #@ open-external-links-in-a-new-window
63
- #: open-external-links-in-a-new-window.php:118
64
- msgid "By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab."
65
- msgstr "Standaard zorgt deze plugin ervoor dat alle externe links (d.w.z. links die buiten de huidige host-naam wijzen) openen in een nieuw venster/tabblad."
66
-
67
- #@ open-external-links-in-a-new-window
68
- #: open-external-links-in-a-new-window.php:120
69
- msgid "You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window."
70
- msgstr "Je kunt dit gedrag veranderen door middel van regular expressions die de vraag of de link moet openen in een nieuw venster ofwel dwingen of negeren."
71
-
72
- #@ open-external-links-in-a-new-window
73
- #: open-external-links-in-a-new-window.php:140
74
- msgid "http:// or https://"
75
- msgstr "http:// of https://"
76
-
77
- #@ default
78
- #: open-external-links-in-a-new-window.php:152
79
- msgid "Settings"
80
- msgstr ""
81
-
82
- #@ open-external-links-in-a-new-window
83
- #: open-external-links-in-a-new-window.php:136
84
- msgid "The matches are prioritized in the following order:"
85
- msgstr "De overeenkomsten worden gesorteerd op volgorde als volgt:"
86
-
87
- #@ open-external-links-in-a-new-window
88
- #: open-external-links-in-a-new-window.php:138
89
- msgid "Ignored, matching URLs"
90
- msgstr "Genegeerde, overeenkomende URL's"
91
-
92
- #@ open-external-links-in-a-new-window
93
- #: open-external-links-in-a-new-window.php:139
94
- msgid "Forced, matching URLs"
95
- msgstr "Gedwongen, overeenkomende URL's"
96
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
open-external-links-in-a-new-window.php CHANGED
@@ -1,158 +1,179 @@
1
  <?php
2
  /*
3
- Plugin Name: Open external links in a new window
4
- Plugin URI: http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/
5
- Description: Opens all external links in a new window. XHTML Strict compliant and search engine optimized (SEO).
6
- Author: Kristian Risager Larsen
7
- Version: 1.3.1
8
- Author URI: http://kezze.dk
9
- Text Domain: open-external-links-in-a-new-window
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  */
11
 
12
- load_plugin_textdomain('open-external-links-in-a-new-window', false, basename( dirname( __FILE__ ) ) );
 
 
 
 
 
 
13
  add_action('wp_head', 'external_links_in_new_windows_client');
14
 
15
  // Loads the code for the website
16
  function external_links_in_new_windows_client()
17
  {
18
- echo "\n\n<!-- ".__("Plugin: Open external links a new window.","open-external-links-in-a-new-window"). " ". __("Plugin by","open-external-links-in-a-new-window"). " Kristian Risager Larsen, http://kristianrisagerlarsen.dk . ".__("Download it at","open-external-links-in-a-new-window")." http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/ -->\n";
19
 
20
  $blogdomain = parse_url(get_option('home'));
21
  echo "<script type=\"text/javascript\">//<![CDATA[";
22
  echo "
23
- function external_links_in_new_windows_loop() {
24
- if (!document.links) {
25
- document.links = document.getElementsByTagName('a');
26
- }
27
- var change_link = false;
28
- var force = '".get_option("external_links_in_new_windows_force")."';
29
- var ignore = '".get_option("external_links_in_new_windows_ignore")."';
30
-
31
- for (var t=0; t<document.links.length; t++) {
32
- var all_links = document.links[t];
33
- change_link = false;
34
-
35
- if(document.links[t].hasAttribute('onClick') == false) {
36
- // forced if the address starts with http (or also https), but does not link to the current domain
37
- if(all_links.href.search(/^http/) != -1 && all_links.href.search('".$blogdomain['host']."') == -1) {
38
- // alert('Changeda '+all_links.href);
39
- change_link = true;
40
- }
41
-
42
- if(force != '' && all_links.href.search(force) != -1) {
43
- // forced
44
- // alert('force '+all_links.href);
45
- change_link = true;
46
- }
47
-
48
- if(ignore != '' && all_links.href.search(ignore) != -1) {
49
- // alert('ignore '+all_links.href);
50
- // ignored
51
- change_link = false;
52
- }
53
-
54
- if(change_link == true) {
55
- // alert('Changed '+all_links.href);
56
- document.links[t].setAttribute('onClick', 'javascript:window.open(\\''+all_links.href+'\\'); return false;');
57
- document.links[t].removeAttribute('target');
58
- }
59
- }
60
- }
61
- }
62
-
63
- // Load
64
- function external_links_in_new_windows_load(func)
65
- {
66
- var oldonload = window.onload;
67
- if (typeof window.onload != 'function'){
68
- window.onload = func;
69
- } else {
70
- window.onload = function(){
71
- oldonload();
72
- func();
73
- }
74
- }
75
- }
76
-
77
- external_links_in_new_windows_load(external_links_in_new_windows_loop);
78
- ";
79
 
80
  echo "//]]></script>\n\n";
81
  }
82
 
83
  // Administration interface
84
- // Based on http://www.themepremium.com/how-to-create-wordpress-plugin-admin-panel/
85
 
86
  /* What to do when the plugin is activated? */
87
- register_activation_hook(__FILE__,'external_links_in_new_windows_activate');
88
 
89
  /* What to do when the plugin is deactivated? */
90
  register_deactivation_hook( __FILE__, 'external_links_in_new_windows_deactivate' );
91
 
92
  function external_links_in_new_windows_activate() {
93
- /* Create a new database field */
94
- update_option("external_links_in_new_windows_force",'');
95
- update_option("external_links_in_new_windows_ignore",'');
96
  }
97
 
98
  function external_links_in_new_windows_deactivate() {
99
- /* Delete the database field */
100
- delete_option('external_links_in_new_windows_force');
101
- delete_option('external_links_in_new_windows_ignore');
102
  }
103
 
104
  add_action('admin_menu', 'external_links_in_new_windows_admin_menu');
105
  function external_links_in_new_windows_admin_menu() {
106
- add_options_page(__('Open external links in a new window',"open-external-links-in-a-new-window"), __('External links',"open-external-links-in-a-new-window"), 'manage_options','external_links_in_new_windows', 'external_links_in_new_windows_admin_options_page');
107
  }
108
 
109
  function external_links_in_new_windows_admin_options_page() {
110
  ?>
111
- <div class="wrap">
112
- <?php screen_icon(); ?>
113
- <h2><?php _e("Open external links in a new window","open-external-links-in-a-new-window"); ?></h2>
114
- <p>
115
- <form method="post" action="options.php">
116
- <?php wp_nonce_field('update-options'); ?>
117
-
118
- <?php _e("By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab.","open-external-links-in-a-new-window"); ?><br />
119
-
120
- <?php _e("You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window.","open-external-links-in-a-new-window"); ?><br />
121
- <br />
122
-
123
-
124
- <?php _e("Force links to open in a new window if they match:","open-external-links-in-a-new-window"); ?><br />
125
- <input name="external_links_in_new_windows_force" type="text" id="external_links_in_new_windows_force" value="<?php echo get_option('external_links_in_new_windows_force'); ?>" style="width: 80%" /><br /><br />
126
-
127
- <?php _e("Ignore links, and do not open them in a new window, if they match: (Even if they start with http:// or https://)","open-external-links-in-a-new-window"); ?><br />
128
- <input name="external_links_in_new_windows_ignore" type="text" id="external_links_in_new_windows_ignore" value="<?php echo get_option('external_links_in_new_windows_ignore'); ?>" style="width: 80%" /><br /><br />
129
-
130
- <input type="hidden" name="action" value="update" />
131
- <input type="hidden" name="page_options" value="external_links_in_new_windows_force,external_links_in_new_windows_ignore" />
132
- <input type="submit" value="<?php _e("Save changes","open-external-links-in-a-new-window");?>" />
133
-
134
- <br /><br />
135
-
136
- <?php _e("The matches are prioritized in the following order:","open-external-links-in-a-new-window"); ?>
137
- <ol>
138
- <li><?php _e("Ignored, matching URLs","open-external-links-in-a-new-window"); ?></li>
139
- <li><?php _e("Forced, matching URLs","open-external-links-in-a-new-window"); ?></li>
140
- <li><?php _e("http:// or https://","open-external-links-in-a-new-window"); ?></li>
141
- </ol>
142
-
143
-
144
- </form>
145
- </p>
146
- </div>
 
147
  <?php
148
  }
149
 
150
  function external_links_in_new_windows_plugin_action_links( $links, $file ) {
151
- if ( $file == plugin_basename( dirname(__FILE__).'/open-external-links-in-a-new-window.php' ) ) {
152
- $links[] = '<a href="options-general.php?page=external_links_in_new_windows">'.__('Settings',"open-external-links-in-a-new-window").'</a>';
153
- }
154
- return $links;
 
 
155
  }
156
 
157
  add_filter( 'plugin_action_links', 'external_links_in_new_windows_plugin_action_links', 10, 2 );
158
- ?>
1
  <?php
2
  /*
3
+ Plugin Name: Open External Links in a New Window
4
+ Plugin URI: https://wordpress.org/extend/plugins/open-external-links-in-a-new-window/
5
+ Description: Opens all external links in a new window. XHTML Strict compliant and search engine optimized (SEO).
6
+ Version: 1.4
7
+ Author: WebFactory Ltd
8
+ Author URI: https://www.webfactoryltd.com/
9
+ Text Domain: open-external-links-in-a-new-window
10
+ License: GPL2
11
+
12
+ Copyright 2015 - 2019 WebFactory Ltd (email: support@webfactoryltd.com)
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License, version 2, as
16
+ published by the Free Software Foundation.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
28
+
29
+ // include only file
30
+ if (!defined('ABSPATH')) {
31
+ wp_die('Do not open this file directly.');
32
+ }
33
+
34
+ load_plugin_textdomain('open-external-links-in-a-new-window');
35
  add_action('wp_head', 'external_links_in_new_windows_client');
36
 
37
  // Loads the code for the website
38
  function external_links_in_new_windows_client()
39
  {
40
+ echo "\n\n<!-- ".__("This site uses the Open External Links in a New Window plugin v1.4 by WebFactory Ltd. ","open-external-links-in-a-new-window"). __("Download it for free at", "open-external-links-in-a-new-window")." https://wordpress.org/extend/plugins/open-external-links-in-a-new-window/ -->\n";
41
 
42
  $blogdomain = parse_url(get_option('home'));
43
  echo "<script type=\"text/javascript\">//<![CDATA[";
44
  echo "
45
+ function external_links_in_new_windows_loop() {
46
+ if (!document.links) {
47
+ document.links = document.getElementsByTagName('a');
48
+ }
49
+ var change_link = false;
50
+ var force = '".trim(get_option("external_links_in_new_windows_force", ''))."';
51
+ var ignore = '".trim(get_option("external_links_in_new_windows_ignore", ''))."';
52
+
53
+ for (var t=0; t<document.links.length; t++) {
54
+ var all_links = document.links[t];
55
+ change_link = false;
56
+
57
+ if(document.links[t].hasAttribute('onClick') == false) {
58
+ // forced if the address starts with http (or also https), but does not link to the current domain
59
+ if(all_links.href.search(/^http/) != -1 && all_links.href.search('".$blogdomain['host']."') == -1 && all_links.href.search(/^#/) == -1) {
60
+ // console.log('Changed ' + all_links.href);
61
+ change_link = true;
62
+ }
63
+
64
+ if(force != '' && all_links.href.search(force) != -1) {
65
+ // forced
66
+ // console.log('force ' + all_links.href);
67
+ change_link = true;
68
+ }
69
+
70
+ if(ignore != '' && all_links.href.search(ignore) != -1) {
71
+ // console.log('ignore ' + all_links.href);
72
+ // ignored
73
+ change_link = false;
74
+ }
75
+
76
+ if(change_link == true) {
77
+ // console.log('Changed ' + all_links.href);
78
+ document.links[t].setAttribute('onClick', 'javascript:window.open(\\''+all_links.href+'\\'); return false;');
79
+ document.links[t].removeAttribute('target');
80
+ }
81
+ }
82
+ }
83
+ }
84
+
85
+ // Load
86
+ function external_links_in_new_windows_load(func)
87
+ {
88
+ var oldonload = window.onload;
89
+ if (typeof window.onload != 'function'){
90
+ window.onload = func;
91
+ } else {
92
+ window.onload = function(){
93
+ oldonload();
94
+ func();
95
+ }
96
+ }
97
+ }
98
+
99
+ external_links_in_new_windows_load(external_links_in_new_windows_loop);
100
+ ";
101
 
102
  echo "//]]></script>\n\n";
103
  }
104
 
105
  // Administration interface
 
106
 
107
  /* What to do when the plugin is activated? */
108
+ register_activation_hook(__FILE__, 'external_links_in_new_windows_activate');
109
 
110
  /* What to do when the plugin is deactivated? */
111
  register_deactivation_hook( __FILE__, 'external_links_in_new_windows_deactivate' );
112
 
113
  function external_links_in_new_windows_activate() {
114
+ update_option("external_links_in_new_windows_force", '');
115
+ update_option("external_links_in_new_windows_ignore", '');
 
116
  }
117
 
118
  function external_links_in_new_windows_deactivate() {
119
+ delete_option('external_links_in_new_windows_force');
120
+ delete_option('external_links_in_new_windows_ignore');
 
121
  }
122
 
123
  add_action('admin_menu', 'external_links_in_new_windows_admin_menu');
124
  function external_links_in_new_windows_admin_menu() {
125
+ add_options_page(__('Open external links in a new window', "open-external-links-in-a-new-window"), __('External Links',"open-external-links-in-a-new-window"), 'manage_options', 'external_links_in_new_windows', 'external_links_in_new_windows_admin_options_page');
126
  }
127
 
128
  function external_links_in_new_windows_admin_options_page() {
129
  ?>
130
+ <div class="wrap">
131
+ <h2><?php _e("Open External Links in a New Window", "open-external-links-in-a-new-window"); ?></h2>
132
+ <p>
133
+ <form method="post" action="options.php">
134
+ <?php wp_nonce_field('update-options'); ?>
135
+
136
+ <?php _e("By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab.","open-external-links-in-a-new-window"); ?><br />
137
+
138
+ <?php _e("You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window.","open-external-links-in-a-new-window"); ?><br />
139
+ <br />
140
+
141
+
142
+ <?php _e("Force links to open in a new window if they match this JS regular expression:","open-external-links-in-a-new-window"); ?><br />
143
+ <input class="regular-text code" name="external_links_in_new_windows_force" type="text" id="external_links_in_new_windows_force" value="<?php echo esc_attr(get_option('external_links_in_new_windows_force', '')); ?>" /><br /><br />
144
+
145
+ <?php _e("Ignore links, and do not open them in a new window, if they match this JS regular expression: (even if they start with http:// or https://)","open-external-links-in-a-new-window"); ?><br />
146
+ <input class="regular-text code" name="external_links_in_new_windows_ignore" type="text" id="external_links_in_new_windows_ignore" value="<?php echo esc_attr(get_option('external_links_in_new_windows_ignore', '')); ?>" /><br /><br />
147
+
148
+ <p>Like the plugin? <a href="https://wordpress.org/support/plugin/open-external-links-in-a-new-window/reviews/#new-post" target="_blank">Please rate it ★★★★★.</a> Thank you!</p>
149
+ </p>
150
+
151
+ <input type="hidden" name="action" value="update" />
152
+ <input type="hidden" name="page_options" value="external_links_in_new_windows_force,external_links_in_new_windows_ignore" />
153
+ <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p>
154
+
155
+
156
+ <?php _e("The matches are prioritized in the following order:","open-external-links-in-a-new-window"); ?>
157
+ <ol>
158
+ <li><?php _e("Ignored, matching URLs","open-external-links-in-a-new-window"); ?></li>
159
+ <li><?php _e("Forced, matching URLs","open-external-links-in-a-new-window"); ?></li>
160
+ <li><?php _e("http:// or https://","open-external-links-in-a-new-window"); ?></li>
161
+ </ol>
162
+
163
+
164
+ </form>
165
+ </p>
166
+ </div>
167
  <?php
168
  }
169
 
170
  function external_links_in_new_windows_plugin_action_links( $links, $file ) {
171
+ if ( $file == plugin_basename( dirname(__FILE__).'/open-external-links-in-a-new-window.php' ) ) {
172
+ $settings = '<a href="options-general.php?page=external_links_in_new_windows">'.__('Settings', "open-external-links-in-a-new-window").'</a>';
173
+ array_unshift($links, $settings);
174
+ }
175
+
176
+ return $links;
177
  }
178
 
179
  add_filter( 'plugin_action_links', 'external_links_in_new_windows_plugin_action_links', 10, 2 );
 
open-external-links-in-a-new-window.pot DELETED
@@ -1,102 +0,0 @@
1
- # Copyright (C) 2012 Open external links in a new window
2
- # This file is distributed under the same license as the Open external links in a new window package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Open external links in a new window 1.3\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/open-external-links-in-a-new-"
7
- "window\n"
8
- "POT-Creation-Date: 2012-05-23 18:24:41+00:00\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
-
16
- #: open-external-links-in-a-new-window.php:18
17
- msgid "Plugin: Open external links a new window."
18
- msgstr ""
19
-
20
- #: open-external-links-in-a-new-window.php:18
21
- msgid "Plugin by"
22
- msgstr ""
23
-
24
- #: open-external-links-in-a-new-window.php:18
25
- msgid "Download it at"
26
- msgstr ""
27
-
28
- #. #-#-#-#-# plugin.pot (Open external links in a new window 1.3) #-#-#-#-#
29
- #. Plugin Name of the plugin/theme
30
- #: open-external-links-in-a-new-window.php:106
31
- #: open-external-links-in-a-new-window.php:113
32
- msgid "Open external links in a new window"
33
- msgstr ""
34
-
35
- #: open-external-links-in-a-new-window.php:106
36
- msgid "External links"
37
- msgstr ""
38
-
39
- #: open-external-links-in-a-new-window.php:118
40
- msgid ""
41
- "By default, this plugins makes all external links (i.e. links that point "
42
- "outside the current host name) open in a new window/tab."
43
- msgstr ""
44
-
45
- #: open-external-links-in-a-new-window.php:120
46
- msgid ""
47
- "You can change this behavior by providing regular expressions that either "
48
- "forces or ignores whether the link should open in a new window."
49
- msgstr ""
50
-
51
- #: open-external-links-in-a-new-window.php:124
52
- msgid "Force links to open in a new window if they match:"
53
- msgstr ""
54
-
55
- #: open-external-links-in-a-new-window.php:127
56
- msgid ""
57
- "Ignore links, and do not open them in a new window, if they match: (Even if "
58
- "they start with http:// or https://)"
59
- msgstr ""
60
-
61
- #: open-external-links-in-a-new-window.php:132
62
- msgid "Save changes"
63
- msgstr ""
64
-
65
- #: open-external-links-in-a-new-window.php:136
66
- msgid "The matches are prioritized in the following order:"
67
- msgstr ""
68
-
69
- #: open-external-links-in-a-new-window.php:138
70
- msgid "Ignored, matching URLs"
71
- msgstr ""
72
-
73
- #: open-external-links-in-a-new-window.php:139
74
- msgid "Forced, matching URLs"
75
- msgstr ""
76
-
77
- #: open-external-links-in-a-new-window.php:140
78
- msgid "http:// or https://"
79
- msgstr ""
80
-
81
- #: open-external-links-in-a-new-window.php:152
82
- msgid "Settings"
83
- msgstr ""
84
-
85
- #. Plugin URI of the plugin/theme
86
- msgid ""
87
- "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
88
- msgstr ""
89
-
90
- #. Description of the plugin/theme
91
- msgid ""
92
- "Opens all external links in a new window. XHTML Strict compliant and search "
93
- "engine optimized (SEO)."
94
- msgstr ""
95
-
96
- #. Author of the plugin/theme
97
- msgid "Kristian Risager Larsen"
98
- msgstr ""
99
-
100
- #. Author URI of the plugin/theme
101
- msgid "http://kezze.dk"
102
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,41 +1,59 @@
1
- === Open external links in a new window ===
2
- Contributors: kezze
3
- Donate link: https://www.paypal.com/xclick/business=paypal%40kezze.dk&item_name=Donation&no_note=1&tax=0&currency_code=EUR
4
- Tags: links, external links, target blank, target new, window.open, new window, blank window, new tab, blank tab, tabs, SEO, xhtml strict, javascript
5
- Requires at least: 2.0
6
- Tested up to: 4.9
7
- Stable tag: trunk
8
-
9
- Opens all (or specific) external links in a new window. XHTML Strict compliant and search engine optimized (SEO).
 
 
10
 
11
  == Description ==
12
- Opens external links (starting with `http://` or `https://`) in a separate browser window (or tab). You can also specify certain URLs that should either be forced to open in a new window or ignored.
13
- The plugin produces XHTML Strict compliant code and is also search engine optimized (SEO).
14
- This is done using JavaScript's `window.open()`-function.
 
15
 
16
  Most other plugins perform a hack by altering the `target` parameter (i.e. `<a href="http://somewhere.example" target="_blank">`). That method is not XHTML Strict compliant.
17
  This plugin handles the links client-side, which lets search engines follow the links properly. Also, if a browser does not support JavaScript, the plugin is simply inactive, and does not result in any errors.
18
 
19
  **Credits**
20
- Inspired by the [Zap_NewWindow](http://www.zappelfillip.de/2005-12-05/zap_newwindow/ "Another Wordpress plugin")-plugin by [Tom K&ouml;hler](http://www.zappelfillip.de/ "His website is mostly in German").
21
  The banner is a [photo](http://www.flickr.com/photos/monja/1367946568/in/photostream/) by [Monja Da Riva](http://www.monja.it/).
22
 
23
  **Translations**
24
- Danish by [Kristian Risager Larsen](http://kristianrisagerlarsen.dk).
25
  Dutch by [Paul Staring](http://www.collectief-it.nl/)
26
- Lithuanian by [Vincent G](http://Host1Free.com).
27
  Other translations will be appreciated!
28
 
29
  **Known bugs**
30
- * The plugin conflicts with other plugins that change the links' `onClick´-attribute.
 
 
 
31
 
32
  == Installation ==
33
  1. Copy the plugin to /wp-content/plugins/
34
  1. Activate the plugin.
35
- 1. Eventually, change the settings in Settings->External links.
36
 
37
  == Changelog ==
38
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  = 1.3.1 =
40
  Verified compatibility with Wordpress 4.0
41
  Added: Plugin logo for Wordpress 4.0
1
+ === External Links in New Window / New Tab ===
2
+ Contributors: WebFactory, wpreset, googlemapswidget, underconstructionpage
3
+ Tags: links, external links, target blank, new window, new tab, target new, blank window, blank tab, tabs, SEO
4
+ Requires at least: 4.0
5
+ Requires PHP: 5.2
6
+ Tested up to: 5.2
7
+ Stable tag: 1.4
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Open external links in a new window or new tab. SEO optimized and XHTML Strict compliant.
12
 
13
  == Description ==
14
+ Opens external links in a new tab or a or new window. You can set URLs that should either be forced to open in a new window or ignored.
15
+
16
+ The plugin produces XHTML Strict compliant code and is search engine optimized (SEO).
17
+ This is done using JavaScript's `window.open()`-function. It adds only a few lines of vanilla JavaScript to the page, and does not require any external libraries like jQuery.
18
 
19
  Most other plugins perform a hack by altering the `target` parameter (i.e. `<a href="http://somewhere.example" target="_blank">`). That method is not XHTML Strict compliant.
20
  This plugin handles the links client-side, which lets search engines follow the links properly. Also, if a browser does not support JavaScript, the plugin is simply inactive, and does not result in any errors.
21
 
22
  **Credits**
23
+ Inspired by the [Zap_NewWindow](http://www.zappelfillip.de/2005-12-05/zap_newwindow/) plugin by [Tom K&ouml;hler](http://www.zappelfillip.de/ "His website is mostly in German").
24
  The banner is a [photo](http://www.flickr.com/photos/monja/1367946568/in/photostream/) by [Monja Da Riva](http://www.monja.it/).
25
 
26
  **Translations**
27
+ Danish by [Kristian Risager Larsen](https://kristianrisagerlarsen.dk)
28
  Dutch by [Paul Staring](http://www.collectief-it.nl/)
29
+ Lithuanian by [Vincent G](http://Host1Free.com)
30
  Other translations will be appreciated!
31
 
32
  **Known bugs**
33
+ The plugin conflicts with other plugins that change the links' `onClick´ attribute.
34
+
35
+ **Original developer**
36
+ Kristian Risager Larsen - <a href="http://kezze.dk">kezze.dk</a>
37
 
38
  == Installation ==
39
  1. Copy the plugin to /wp-content/plugins/
40
  1. Activate the plugin.
41
+ 1. Eventually, change the settings in Settings->External Links.
42
 
43
  == Changelog ==
44
 
45
+ = 1.4 =
46
+ * 2019-08-26
47
+ * WebFactory took over development
48
+ * minor fixes
49
+ * 40,000 installs; 178,750 downloads
50
+
51
+ = 1.3.3 =
52
+ Verified compatibility with Wordpress 5.0
53
+
54
+ = 1.3.2 =
55
+ Updated: Danish translation
56
+
57
  = 1.3.1 =
58
  Verified compatibility with Wordpress 4.0
59
  Added: Plugin logo for Wordpress 4.0
trunk/open-external-links-in-a-new-window-da_DK.mo DELETED
Binary file
trunk/open-external-links-in-a-new-window-da_DK.po DELETED
@@ -1,116 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Plugins - Open external links in a new window - "
4
- "Development (trunk)\n"
5
- "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2017-11-02 10:42+0000\n"
7
- "PO-Revision-Date: 2017-11-02 10:43+0000\n"
8
- "Last-Translator: \n"
9
- "Language-Team: Danish (Denmark)\n"
10
- "Language: da-DK\n"
11
- "Plural-Forms: nplurals=2; plural=n != 1\n"
12
- "MIME-Version: 1.0\n"
13
- "Content-Type: text/plain; charset=UTF-8\n"
14
- "Content-Transfer-Encoding: 8bit\n"
15
- "X-Loco-Source-Locale: da_NL\n"
16
- "X-Generator: Loco - https://localise.biz/\n"
17
- "X-Loco-Parser: loco_parse_po"
18
-
19
- #. Author URI of the plugin/theme
20
- msgid "http://kezze.dk"
21
- msgstr "https://kristianrisagerlarsen.dk"
22
-
23
- #. Author of the plugin/theme
24
- msgid "Kristian Risager Larsen"
25
- msgstr "Kristian Risager Larsen"
26
-
27
- #. Description of the plugin/theme
28
- msgid ""
29
- "Opens all external links in a new window. XHTML Strict compliant and search "
30
- "engine optimized (SEO)."
31
- msgstr ""
32
- "Åbner alle eksterne links i et nyt vindue/faneblad. Er i overensstemmelse "
33
- "med XHTML strict og tager højde for søgemaskineoptimering (SEO)."
34
-
35
- #. Plugin URI of the plugin/theme
36
- msgid ""
37
- "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
38
- msgstr ""
39
- "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
40
-
41
- #: open-external-links-in-a-new-window.php:152
42
- msgid "Settings"
43
- msgstr "Indstillinger"
44
-
45
- #: open-external-links-in-a-new-window.php:140
46
- msgid "http:// or https://"
47
- msgstr "http:// eller https://"
48
-
49
- #: open-external-links-in-a-new-window.php:139
50
- msgid "Forced, matching URLs"
51
- msgstr "Gennemtvungne, matchende URL'er"
52
-
53
- #: open-external-links-in-a-new-window.php:138
54
- msgid "Ignored, matching URLs"
55
- msgstr "Ignorerede, matchende URL'er"
56
-
57
- #: open-external-links-in-a-new-window.php:136
58
- msgid "The matches are prioritized in the following order:"
59
- msgstr "De matchende URL'er bliver prioriteret i den følgende rækkefølge:"
60
-
61
- #: open-external-links-in-a-new-window.php:132
62
- msgid "Save changes"
63
- msgstr "Gem ændringer"
64
-
65
- #: open-external-links-in-a-new-window.php:127
66
- msgid ""
67
- "Ignore links, and do not open them in a new window, if they match: (Even if "
68
- "they start with http:// or https://)"
69
- msgstr ""
70
- "Ignorer links, og åbn dem ikke i et nyt vindue, hvis de matcher: (Også "
71
- "selvom de starter med http:// eller https://)"
72
-
73
- #: open-external-links-in-a-new-window.php:124
74
- msgid "Force links to open in a new window if they match:"
75
- msgstr "Tving links til at åbne i et nyt vindue, hvis de matcher:"
76
-
77
- #: open-external-links-in-a-new-window.php:120
78
- msgid ""
79
- "You can change this behavior by providing regular expressions that either "
80
- "forces or ignores whether the link should open in a new window."
81
- msgstr ""
82
- "Du kan ændre dette ved at skrive regular expressions, som enten "
83
- "gennemtvinger at et matchende link skal åbne i et nyt vindue, eller "
84
- "ignorerer det matchende link."
85
-
86
- #: open-external-links-in-a-new-window.php:118
87
- msgid ""
88
- "By default, this plugins makes all external links (i.e. links that point "
89
- "outside the current host name) open in a new window/tab."
90
- msgstr ""
91
- "Som udgangspunkt sørger dette plugin for at åbne alle eksterne links (dvs. "
92
- "links, der peger væk fra det nuværende værtsnavn) i et nyt vindue/tab."
93
-
94
- #: open-external-links-in-a-new-window.php:106
95
- msgid "External links"
96
- msgstr "Eksterne links"
97
-
98
- #. #-#-#-#-# tmp-open-external-links-in-a-new-window.pot (Open external links
99
- #. in a new window 1.3.1) #-#-#-#-#
100
- #. Plugin Name of the plugin/theme
101
- #: open-external-links-in-a-new-window.php:106
102
- #: open-external-links-in-a-new-window.php:113
103
- msgid "Open external links in a new window"
104
- msgstr "Åbn eksterne links i et nyt vindue."
105
-
106
- #: open-external-links-in-a-new-window.php:18
107
- msgid "Download it at"
108
- msgstr "Hent det fra"
109
-
110
- #: open-external-links-in-a-new-window.php:18
111
- msgid "Plugin by"
112
- msgstr "Plugin af"
113
-
114
- #: open-external-links-in-a-new-window.php:18
115
- msgid "Plugin: Open external links a new window."
116
- msgstr "Plugin: Åbn eksterne links i et nyt vindue."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/open-external-links-in-a-new-window-lt_LT.mo DELETED
Binary file
trunk/open-external-links-in-a-new-window-lt_LT.po DELETED
@@ -1,95 +0,0 @@
1
- # Copyright (C) 2012 Open external links in a new window
2
- # This file is distributed under the same license as the Open external links in a new window package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Open external links in a new window 1.3\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/open-external-links-in-a-new-window\n"
7
- "POT-Creation-Date: 2012-05-23 18:24:41+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2012-05-25 14:05+0200\n"
12
- "Last-Translator: \n"
13
- "Language-Team: Host1Free\n"
14
- "X-Poedit-Language: Lithuanian\n"
15
- "X-Poedit-Country: Lithuania\n"
16
-
17
- #: open-external-links-in-a-new-window.php:18
18
- msgid "Plugin: Open external links a new window."
19
- msgstr "Papildinys: Atidaryti išorines nuorodas naujame lange."
20
-
21
- #: open-external-links-in-a-new-window.php:18
22
- msgid "Plugin by"
23
- msgstr "Papildinys sukurtas"
24
-
25
- #: open-external-links-in-a-new-window.php:18
26
- msgid "Download it at"
27
- msgstr "Parsisiųskite tai iš"
28
-
29
- #. #-#-#-#-# plugin.pot (Open external links in a new window 1.3) #-#-#-#-#
30
- #. Plugin Name of the plugin/theme
31
- #: open-external-links-in-a-new-window.php:106
32
- #: open-external-links-in-a-new-window.php:113
33
- msgid "Open external links in a new window"
34
- msgstr "Atidaryti išorines nuorodas naujame lange"
35
-
36
- #: open-external-links-in-a-new-window.php:106
37
- msgid "External links"
38
- msgstr "Išorinės nuorodos"
39
-
40
- #: open-external-links-in-a-new-window.php:118
41
- msgid "By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab."
42
- msgstr "Pagal numatytasias parinktis, šis papildinys padaro taip, kad visos išorinės nuorodos (pvz. nuorodos, kurios nurodo į kitus, negu dabartinis puslapis) atsidarytų naujame lange/kortelėje."
43
-
44
- #: open-external-links-in-a-new-window.php:120
45
- msgid "You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window."
46
- msgstr "Jūs galite pakeisti šią elgseną, įprastų išsireiškimų pagalbą, kurie priverčia langą atsidaryti naujame lange, arba šią parinktį ignoruoja."
47
-
48
- #: open-external-links-in-a-new-window.php:124
49
- msgid "Force links to open in a new window if they match:"
50
- msgstr "Priversti nuorodas atidaryti naujame lange, jeigu jos atitinka:"
51
-
52
- #: open-external-links-in-a-new-window.php:127
53
- msgid "Ignore links, and do not open them in a new window, if they match: (Even if they start with http:// or https://)"
54
- msgstr "Ignoruoti nuorodas ir neatidarinėti jų naujame lange, jeigu jos atitinka: (Net jeigu jos praisdeda http:// arba https://)"
55
-
56
- #: open-external-links-in-a-new-window.php:132
57
- msgid "Save changes"
58
- msgstr "Įrašyti pakeitimus"
59
-
60
- #: open-external-links-in-a-new-window.php:136
61
- msgid "The matches are prioritized in the following order:"
62
- msgstr "Atitinkams pirmenybė teikiama šia tvarka:"
63
-
64
- #: open-external-links-in-a-new-window.php:138
65
- msgid "Ignored, matching URLs"
66
- msgstr "Ignoruojamos, atitinkančios universaliosios nuorodos"
67
-
68
- #: open-external-links-in-a-new-window.php:139
69
- msgid "Forced, matching URLs"
70
- msgstr "Priverstinai atitinkančioms universaliosioms nuorodoms"
71
-
72
- #: open-external-links-in-a-new-window.php:140
73
- msgid "http:// or https://"
74
- msgstr "http:// arba https://"
75
-
76
- #: open-external-links-in-a-new-window.php:152
77
- msgid "Settings"
78
- msgstr "Nuostatos"
79
-
80
- #. Plugin URI of the plugin/theme
81
- msgid "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
82
- msgstr "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
83
-
84
- #. Description of the plugin/theme
85
- msgid "Opens all external links in a new window. XHTML Strict compliant and search engine optimized (SEO)."
86
- msgstr "Atidaro visas išorines nuorodas naujame naršyklės lange. Griežtai atitinkantis XHTML and paieškos sistemos optimizavimą (SEO)"
87
-
88
- #. Author of the plugin/theme
89
- msgid "Kristian Risager Larsen"
90
- msgstr "Kristian Risager Larsen"
91
-
92
- #. Author URI of the plugin/theme
93
- msgid "http://kezze.dk"
94
- msgstr "http://kezze.dk"
95
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/open-external-links-in-a-new-window-nl_NL.mo DELETED
Binary file
trunk/open-external-links-in-a-new-window-nl_NL.po DELETED
@@ -1,96 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Open external links in a new window\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-05-23 12:30+0100\n"
6
- "PO-Revision-Date: 2012-05-26 15:38+0100\n"
7
- "Last-Translator: Paul Staring <info@collectief-it.nl>\n"
8
- "Language-Team: Kristian Risager Larsen\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: Dutch\n"
14
- "X-Poedit-Country: NETHERLANDS\n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
- "X-Poedit-Basepath: .\n"
18
- "X-Textdomain-Support: yes\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
-
21
- #@ open-external-links-in-a-new-window
22
- #: open-external-links-in-a-new-window.php:18
23
- msgid "Plugin: Open external links a new window."
24
- msgstr "Plugin: Open externe links in een nieuw venster."
25
-
26
- #@ open-external-links-in-a-new-window
27
- #: open-external-links-in-a-new-window.php:18
28
- msgid "Plugin by"
29
- msgstr "Plugin door"
30
-
31
- #@ open-external-links-in-a-new-window
32
- #: open-external-links-in-a-new-window.php:18
33
- msgid "Download it at"
34
- msgstr "Download het van"
35
-
36
- #@ open-external-links-in-a-new-window
37
- #: open-external-links-in-a-new-window.php:106
38
- #: open-external-links-in-a-new-window.php:113
39
- msgid "Open external links in a new window"
40
- msgstr "Open externe links in een nieuw venster"
41
-
42
- #@ open-external-links-in-a-new-window
43
- #: open-external-links-in-a-new-window.php:106
44
- msgid "External links"
45
- msgstr "Externe links"
46
-
47
- #@ open-external-links-in-a-new-window
48
- #: open-external-links-in-a-new-window.php:124
49
- msgid "Force links to open in a new window if they match:"
50
- msgstr "Dwing links in een nieuw venster te openen, indien ze overeenkomen met:"
51
-
52
- #@ open-external-links-in-a-new-window
53
- #: open-external-links-in-a-new-window.php:127
54
- msgid "Ignore links, and do not open them in a new window, if they match: (Even if they start with http:// or https://)"
55
- msgstr "Negeer links en open ze niet in een nieuw venster, indien ze overeenkomen met: (Zelfs als ze beginnen met http:// of https://)"
56
-
57
- #@ open-external-links-in-a-new-window
58
- #: open-external-links-in-a-new-window.php:132
59
- msgid "Save changes"
60
- msgstr "Wijzigingen opslaan"
61
-
62
- #@ open-external-links-in-a-new-window
63
- #: open-external-links-in-a-new-window.php:118
64
- msgid "By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab."
65
- msgstr "Standaard zorgt deze plugin ervoor dat alle externe links (d.w.z. links die buiten de huidige host-naam wijzen) openen in een nieuw venster/tabblad."
66
-
67
- #@ open-external-links-in-a-new-window
68
- #: open-external-links-in-a-new-window.php:120
69
- msgid "You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window."
70
- msgstr "Je kunt dit gedrag veranderen door middel van regular expressions die de vraag of de link moet openen in een nieuw venster ofwel dwingen of negeren."
71
-
72
- #@ open-external-links-in-a-new-window
73
- #: open-external-links-in-a-new-window.php:140
74
- msgid "http:// or https://"
75
- msgstr "http:// of https://"
76
-
77
- #@ default
78
- #: open-external-links-in-a-new-window.php:152
79
- msgid "Settings"
80
- msgstr ""
81
-
82
- #@ open-external-links-in-a-new-window
83
- #: open-external-links-in-a-new-window.php:136
84
- msgid "The matches are prioritized in the following order:"
85
- msgstr "De overeenkomsten worden gesorteerd op volgorde als volgt:"
86
-
87
- #@ open-external-links-in-a-new-window
88
- #: open-external-links-in-a-new-window.php:138
89
- msgid "Ignored, matching URLs"
90
- msgstr "Genegeerde, overeenkomende URL's"
91
-
92
- #@ open-external-links-in-a-new-window
93
- #: open-external-links-in-a-new-window.php:139
94
- msgid "Forced, matching URLs"
95
- msgstr "Gedwongen, overeenkomende URL's"
96
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/open-external-links-in-a-new-window.php DELETED
@@ -1,172 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Open external links in a new window
4
- Plugin URI: https://wordpress.org/extend/plugins/open-external-links-in-a-new-window/
5
- Description: Opens all external links in a new window. XHTML Strict compliant and search engine optimized (SEO).
6
- Author: Kristian Risager Larsen
7
- Version: 1.3.2
8
- Author URI: https://kristianrisagerlarsen.dk
9
- Text Domain: open-external-links-in-a-new-window
10
- License: GPL2
11
-
12
- This plugin is free software: you can redistribute it and/or modify
13
- it under the terms of the GNU General Public License as published by
14
- the Free Software Foundation, either version 2 of the License, or
15
- any later version.
16
-
17
- This plugin is distributed in the hope that it will be useful,
18
- but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- GNU General Public License for more details.
21
-
22
- You should have received a copy of the GNU General Public License
23
- along with this plugin. If not, see https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html .
24
- */
25
-
26
- load_plugin_textdomain('open-external-links-in-a-new-window', false, basename( dirname( __FILE__ ) ) );
27
- add_action('wp_head', 'external_links_in_new_windows_client');
28
-
29
- // Loads the code for the website
30
- function external_links_in_new_windows_client()
31
- {
32
- echo "\n\n<!-- ".__("Plugin: Open external links a new window.","open-external-links-in-a-new-window"). " ". __("Plugin by","open-external-links-in-a-new-window"). " Kristian Risager Larsen, http://kristianrisagerlarsen.dk . ".__("Download it at","open-external-links-in-a-new-window")." http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/ -->\n";
33
-
34
- $blogdomain = parse_url(get_option('home'));
35
- echo "<script type=\"text/javascript\">//<![CDATA[";
36
- echo "
37
- function external_links_in_new_windows_loop() {
38
- if (!document.links) {
39
- document.links = document.getElementsByTagName('a');
40
- }
41
- var change_link = false;
42
- var force = '".get_option("external_links_in_new_windows_force")."';
43
- var ignore = '".get_option("external_links_in_new_windows_ignore")."';
44
-
45
- for (var t=0; t<document.links.length; t++) {
46
- var all_links = document.links[t];
47
- change_link = false;
48
-
49
- if(document.links[t].hasAttribute('onClick') == false) {
50
- // forced if the address starts with http (or also https), but does not link to the current domain
51
- if(all_links.href.search(/^http/) != -1 && all_links.href.search('".$blogdomain['host']."') == -1) {
52
- // alert('Changeda '+all_links.href);
53
- change_link = true;
54
- }
55
-
56
- if(force != '' && all_links.href.search(force) != -1) {
57
- // forced
58
- // alert('force '+all_links.href);
59
- change_link = true;
60
- }
61
-
62
- if(ignore != '' && all_links.href.search(ignore) != -1) {
63
- // alert('ignore '+all_links.href);
64
- // ignored
65
- change_link = false;
66
- }
67
-
68
- if(change_link == true) {
69
- // alert('Changed '+all_links.href);
70
- document.links[t].setAttribute('onClick', 'javascript:window.open(\\''+all_links.href+'\\'); return false;');
71
- document.links[t].removeAttribute('target');
72
- }
73
- }
74
- }
75
- }
76
-
77
- // Load
78
- function external_links_in_new_windows_load(func)
79
- {
80
- var oldonload = window.onload;
81
- if (typeof window.onload != 'function'){
82
- window.onload = func;
83
- } else {
84
- window.onload = function(){
85
- oldonload();
86
- func();
87
- }
88
- }
89
- }
90
-
91
- external_links_in_new_windows_load(external_links_in_new_windows_loop);
92
- ";
93
-
94
- echo "//]]></script>\n\n";
95
- }
96
-
97
- // Administration interface
98
- // Based on http://www.themepremium.com/how-to-create-wordpress-plugin-admin-panel/
99
-
100
- /* What to do when the plugin is activated? */
101
- register_activation_hook(__FILE__,'external_links_in_new_windows_activate');
102
-
103
- /* What to do when the plugin is deactivated? */
104
- register_deactivation_hook( __FILE__, 'external_links_in_new_windows_deactivate' );
105
-
106
- function external_links_in_new_windows_activate() {
107
- /* Create a new database field */
108
- update_option("external_links_in_new_windows_force",'');
109
- update_option("external_links_in_new_windows_ignore",'');
110
- }
111
-
112
- function external_links_in_new_windows_deactivate() {
113
- /* Delete the database field */
114
- delete_option('external_links_in_new_windows_force');
115
- delete_option('external_links_in_new_windows_ignore');
116
- }
117
-
118
- add_action('admin_menu', 'external_links_in_new_windows_admin_menu');
119
- function external_links_in_new_windows_admin_menu() {
120
- add_options_page(__('Open external links in a new window',"open-external-links-in-a-new-window"), __('External links',"open-external-links-in-a-new-window"), 'manage_options','external_links_in_new_windows', 'external_links_in_new_windows_admin_options_page');
121
- }
122
-
123
- function external_links_in_new_windows_admin_options_page() {
124
- ?>
125
- <div class="wrap">
126
- <?php screen_icon(); ?>
127
- <h2><?php _e("Open external links in a new window","open-external-links-in-a-new-window"); ?></h2>
128
- <p>
129
- <form method="post" action="options.php">
130
- <?php wp_nonce_field('update-options'); ?>
131
-
132
- <?php _e("By default, this plugins makes all external links (i.e. links that point outside the current host name) open in a new window/tab.","open-external-links-in-a-new-window"); ?><br />
133
-
134
- <?php _e("You can change this behavior by providing regular expressions that either forces or ignores whether the link should open in a new window.","open-external-links-in-a-new-window"); ?><br />
135
- <br />
136
-
137
-
138
- <?php _e("Force links to open in a new window if they match:","open-external-links-in-a-new-window"); ?><br />
139
- <input name="external_links_in_new_windows_force" type="text" id="external_links_in_new_windows_force" value="<?php echo get_option('external_links_in_new_windows_force'); ?>" style="width: 80%" /><br /><br />
140
-
141
- <?php _e("Ignore links, and do not open them in a new window, if they match: (Even if they start with http:// or https://)","open-external-links-in-a-new-window"); ?><br />
142
- <input name="external_links_in_new_windows_ignore" type="text" id="external_links_in_new_windows_ignore" value="<?php echo get_option('external_links_in_new_windows_ignore'); ?>" style="width: 80%" /><br /><br />
143
-
144
- <input type="hidden" name="action" value="update" />
145
- <input type="hidden" name="page_options" value="external_links_in_new_windows_force,external_links_in_new_windows_ignore" />
146
- <input type="submit" value="<?php _e("Save changes","open-external-links-in-a-new-window");?>" />
147
-
148
- <br /><br />
149
-
150
- <?php _e("The matches are prioritized in the following order:","open-external-links-in-a-new-window"); ?>
151
- <ol>
152
- <li><?php _e("Ignored, matching URLs","open-external-links-in-a-new-window"); ?></li>
153
- <li><?php _e("Forced, matching URLs","open-external-links-in-a-new-window"); ?></li>
154
- <li><?php _e("http:// or https://","open-external-links-in-a-new-window"); ?></li>
155
- </ol>
156
-
157
-
158
- </form>
159
- </p>
160
- </div>
161
- <?php
162
- }
163
-
164
- function external_links_in_new_windows_plugin_action_links( $links, $file ) {
165
- if ( $file == plugin_basename( dirname(__FILE__).'/open-external-links-in-a-new-window.php' ) ) {
166
- $links[] = '<a href="options-general.php?page=external_links_in_new_windows">'.__('Settings',"open-external-links-in-a-new-window").'</a>';
167
- }
168
- return $links;
169
- }
170
-
171
- add_filter( 'plugin_action_links', 'external_links_in_new_windows_plugin_action_links', 10, 2 );
172
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/open-external-links-in-a-new-window.pot DELETED
@@ -1,102 +0,0 @@
1
- # Copyright (C) 2012 Open external links in a new window
2
- # This file is distributed under the same license as the Open external links in a new window package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Open external links in a new window 1.3\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/open-external-links-in-a-new-"
7
- "window\n"
8
- "POT-Creation-Date: 2012-05-23 18:24:41+00:00\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
-
16
- #: open-external-links-in-a-new-window.php:18
17
- msgid "Plugin: Open external links a new window."
18
- msgstr ""
19
-
20
- #: open-external-links-in-a-new-window.php:18
21
- msgid "Plugin by"
22
- msgstr ""
23
-
24
- #: open-external-links-in-a-new-window.php:18
25
- msgid "Download it at"
26
- msgstr ""
27
-
28
- #. #-#-#-#-# plugin.pot (Open external links in a new window 1.3) #-#-#-#-#
29
- #. Plugin Name of the plugin/theme
30
- #: open-external-links-in-a-new-window.php:106
31
- #: open-external-links-in-a-new-window.php:113
32
- msgid "Open external links in a new window"
33
- msgstr ""
34
-
35
- #: open-external-links-in-a-new-window.php:106
36
- msgid "External links"
37
- msgstr ""
38
-
39
- #: open-external-links-in-a-new-window.php:118
40
- msgid ""
41
- "By default, this plugins makes all external links (i.e. links that point "
42
- "outside the current host name) open in a new window/tab."
43
- msgstr ""
44
-
45
- #: open-external-links-in-a-new-window.php:120
46
- msgid ""
47
- "You can change this behavior by providing regular expressions that either "
48
- "forces or ignores whether the link should open in a new window."
49
- msgstr ""
50
-
51
- #: open-external-links-in-a-new-window.php:124
52
- msgid "Force links to open in a new window if they match:"
53
- msgstr ""
54
-
55
- #: open-external-links-in-a-new-window.php:127
56
- msgid ""
57
- "Ignore links, and do not open them in a new window, if they match: (Even if "
58
- "they start with http:// or https://)"
59
- msgstr ""
60
-
61
- #: open-external-links-in-a-new-window.php:132
62
- msgid "Save changes"
63
- msgstr ""
64
-
65
- #: open-external-links-in-a-new-window.php:136
66
- msgid "The matches are prioritized in the following order:"
67
- msgstr ""
68
-
69
- #: open-external-links-in-a-new-window.php:138
70
- msgid "Ignored, matching URLs"
71
- msgstr ""
72
-
73
- #: open-external-links-in-a-new-window.php:139
74
- msgid "Forced, matching URLs"
75
- msgstr ""
76
-
77
- #: open-external-links-in-a-new-window.php:140
78
- msgid "http:// or https://"
79
- msgstr ""
80
-
81
- #: open-external-links-in-a-new-window.php:152
82
- msgid "Settings"
83
- msgstr ""
84
-
85
- #. Plugin URI of the plugin/theme
86
- msgid ""
87
- "http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/"
88
- msgstr ""
89
-
90
- #. Description of the plugin/theme
91
- msgid ""
92
- "Opens all external links in a new window. XHTML Strict compliant and search "
93
- "engine optimized (SEO)."
94
- msgstr ""
95
-
96
- #. Author of the plugin/theme
97
- msgid "Kristian Risager Larsen"
98
- msgstr ""
99
-
100
- #. Author URI of the plugin/theme
101
- msgid "http://kezze.dk"
102
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,94 +0,0 @@
1
- === Open external links in a new window ===
2
- Contributors: kezze
3
- Donate link: https://www.paypal.com/xclick/business=paypal%40kezze.dk&item_name=Donation&no_note=1&tax=0&currency_code=EUR
4
- Tags: links, external links, target blank, target new, window.open, new window, blank window, new tab, blank tab, tabs, SEO, xhtml strict, javascript
5
- Requires at least: 2.0
6
- Tested up to: 4.9
7
- Stable tag: trunk
8
-
9
- Opens all (or specific) external links in a new window. XHTML Strict compliant and search engine optimized (SEO).
10
-
11
- == Description ==
12
- Opens external links (starting with `http://` or `https://`) in a separate browser tab (or window). You can also specify certain URLs that should either be forced to open in a new window or ignored.
13
- The plugin produces XHTML Strict compliant code and is also search engine optimized (SEO).
14
- This is done using JavaScript's `window.open()`-function.
15
-
16
- Most other plugins perform a hack by altering the `target` parameter (i.e. `<a href="http://somewhere.example" target="_blank">`). That method is not XHTML Strict compliant.
17
- This plugin handles the links client-side, which lets search engines follow the links properly. Also, if a browser does not support JavaScript, the plugin is simply inactive, and does not result in any errors.
18
-
19
- **Credits**
20
- Inspired by the [Zap_NewWindow](http://www.zappelfillip.de/2005-12-05/zap_newwindow/ "Another Wordpress plugin")-plugin by [Tom K&ouml;hler](http://www.zappelfillip.de/ "His website is mostly in German").
21
- The banner is a [photo](http://www.flickr.com/photos/monja/1367946568/in/photostream/) by [Monja Da Riva](http://www.monja.it/).
22
-
23
- **Translations**
24
- Danish by [Kristian Risager Larsen](https://kristianrisagerlarsen.dk).
25
- Dutch by [Paul Staring](http://www.collectief-it.nl/)
26
- Lithuanian by [Vincent G](http://Host1Free.com).
27
- Other translations will be appreciated!
28
-
29
- **Known bugs**
30
- The plugin conflicts with other plugins that change the links' `onClick´-attribute.
31
-
32
- == Installation ==
33
- 1. Copy the plugin to /wp-content/plugins/
34
- 1. Activate the plugin.
35
- 1. Eventually, change the settings in Settings->External links.
36
-
37
- == Changelog ==
38
-
39
- = 1.3.2 =
40
- Updated: Danish translation
41
-
42
- = 1.3.1 =
43
- Verified compatibility with Wordpress 4.0
44
- Added: Plugin logo for Wordpress 4.0
45
- Added: Dutch translation.
46
-
47
- = 1.3 =
48
- Added: Possibility to force and ignore user-defined strings in URLs. This feature has been requested.
49
- Added: Lithuanian and Danish translation.
50
-
51
- = 1.2 =
52
- Added: Translation-ready.
53
-
54
- = 1.1.1 =
55
- Fixed: Deprecation warning (Thanks to [boo1865](http://wordpress.org/support/topic/plugin-open-external-links-in-a-new-window-doesnt-work?replies=2#post-2152292))
56
-
57
- = 1.1.0 =
58
- Changed: Better practice for opening links. The plugin now uses the onClick-attribute instead of writing JavaScript directly into the href-attribute. This enables users to right-click the link and open in a new window/tab, save the target etc.
59
-
60
- = 1.0.1 =
61
- Fixed: Removes target attribute from links instead of setting the attribute to null. (Thanks to [crashnet](http://wordpress.org/support/topic/plugin-open-external-links-in-a-new-window-target-attribute-left-empty?replies=2#post-1813522))
62
-
63
- = 1.0 =
64
- Fixed: Credits to Tom K&ouml;hler (Charset).
65
- Fixed: Links.
66
-
67
- = 0.9 =
68
- Initial release.
69
-
70
- == Upgrade Notice ==
71
-
72
- = 1.3.1 =
73
- Wordpress 4.0-compatibility, and Dutch translation.
74
-
75
- = 1.3 =
76
- In Settings->External links, you can now specify URL's that should be either forced to open in a new window, or ignored.
77
-
78
- = 1.2 =
79
- Added: Translation-ready.
80
-
81
- = 1.1.1 =
82
- Fixed: Deprecation warning.
83
-
84
- = 1.1.0 =
85
- Better practice for opening links. Please upgrade.
86
-
87
- = 1.0.1 =
88
- Minor bugfix.
89
-
90
- = 1.0 =
91
- Ready for production.
92
-
93
- = 0.9 =
94
- Initial release