Open external links in a new window - Version 1.3

Version Description

Added: Possibility to force and ignore user-defined strings in URLs. This feature has been requested. Added: Lithuanian and Danish translation.

Download this release

Release Info

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

Code changes from version 1.2 to 1.3

open-external-links-in-a-new-window-da_DK.mo CHANGED
Binary file
open-external-links-in-a-new-window-da_DK.po CHANGED
@@ -13,23 +13,85 @@ msgstr ""
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-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:17
23
  msgid "Plugin: Open external links a new window."
24
  msgstr "Plugin: Åbn eksterne links i et nyt vindue."
25
 
 
26
  #@ open-external-links-in-a-new-window
27
- #: open-external-links-in-a-new-window.php:17
28
  msgid "Plugin by"
29
  msgstr "Plugin af"
30
 
 
31
  #@ open-external-links-in-a-new-window
32
- #: open-external-links-in-a-new-window.php:17
33
  msgid "Download it at"
34
  msgstr "Hent det fra"
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-default.mo DELETED
Binary file
open-external-links-in-a-new-window-default.po DELETED
@@ -1,29 +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: KRL\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-Language: English\n"
15
- "X-Poedit-Country: UNITED STATES\n"
16
- "X-Poedit-SearchPath-0: .\n"
17
-
18
- #: open-external-links-in-a-new-window.php:17
19
- msgid "Plugin: Open external links a new window."
20
- msgstr "Plugin: Open external links a new window."
21
-
22
- #: open-external-links-in-a-new-window.php:17
23
- msgid "Plugin by"
24
- msgstr "Plugin by"
25
-
26
- #: open-external-links-in-a-new-window.php:17
27
- msgid "Download it at"
28
- msgstr "Download it at"
29
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
open-external-links-in-a-new-window-lt_LT.mo ADDED
Binary file
open-external-links-in-a-new-window-lt_LT.po ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.php CHANGED
@@ -4,39 +4,64 @@ 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.2
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
 
14
- add_action('wp_head', 'external_links_in_new_windows');
15
-
16
- function external_links_in_new_windows()
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 makeNewWindows() {
24
  if (!document.links) {
25
  document.links = document.getElementsByTagName('a');
26
  }
 
 
 
27
 
28
  for (var t=0; t<document.links.length; t++) {
29
  var all_links = document.links[t];
30
- if (all_links.href.search(/^http/) != -1) { // Catches both http and https
31
- if (all_links.href.search('/".$blogdomain['host']."/') == -1 && document.links[t].hasAttribute('onClick') == false) {
32
- document.links[t].setAttribute('onClick', 'javascript:window.open(\\''+all_links.href+'\\'); return false;');
33
- document.links[t].removeAttribute('target');
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
  }
38
 
39
- function addLoadEvent2(func)
 
40
  {
41
  var oldonload = window.onload;
42
  if (typeof window.onload != 'function'){
@@ -49,9 +74,85 @@ function external_links_in_new_windows()
49
  }
50
  }
51
 
52
- addLoadEvent2(makeNewWindows);
53
  ";
54
 
55
  echo "//]]></script>\n\n";
56
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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'){
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
+ ?>
open-external-links-in-a-new-window.pot ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -4,32 +4,41 @@ Donate link: https://www.paypal.com/xclick/business=paypal%40kezze.dk&item_name=
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: 3.3
7
- Stable tag: 1.2
8
 
9
- Opens all external links in a new window. XHTML Strict compliant and search engine optimized (SEO).
10
 
11
  == Description ==
12
- Opens all external links (starting with `http://` or `https://`) in a separate browser window.
13
  The plugin produces XHTML Strict compliant code and is also search engine optimized (SEO).
14
-
15
  This is done using JavaScript's `window.open()`-function.
16
 
17
  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.
18
- 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.
19
 
20
  **Credits**
21
  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").
22
  The banner is a [photo](http://www.flickr.com/photos/monja/1367946568/in/photostream/) by [Monja Da Riva](http://www.monja.it/).
23
 
 
 
 
 
 
24
  **Known bugs**
25
  * The plugin conflicts with other plugins that change the links' `onClick´-attribute.
26
 
27
  == Installation ==
28
  1. Copy the plugin to /wp-content/plugins/
29
- 1. Activate this plugin.
 
30
 
31
  == Changelog ==
32
 
 
 
 
 
33
  = 1.2 =
34
  Added: Translation-ready.
35
 
@@ -51,6 +60,9 @@ Initial release.
51
 
52
  == Upgrade Notice ==
53
 
 
 
 
54
  = 1.2 =
55
  Added: Translation-ready.
56
 
@@ -67,4 +79,4 @@ Minor bugfix.
67
  Ready for production.
68
 
69
  = 0.9 =
70
- Initial release
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: 3.3
7
+ Stable tag: 1.3
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
+ Lithuanian by [Vincent G](http://Host1Free.com).
26
+ Other translations will be appreciated!
27
+
28
  **Known bugs**
29
  * The plugin conflicts with other plugins that change the links' `onClick´-attribute.
30
 
31
  == Installation ==
32
  1. Copy the plugin to /wp-content/plugins/
33
+ 1. Activate the plugin.
34
+ 1. Eventually, change the settings in Settings->External links.
35
 
36
  == Changelog ==
37
 
38
+ = 1.3 =
39
+ Added: Possibility to force and ignore user-defined strings in URLs. This feature has been requested.
40
+ Added: Lithuanian and Danish translation.
41
+
42
  = 1.2 =
43
  Added: Translation-ready.
44
 
60
 
61
  == Upgrade Notice ==
62
 
63
+ = 1.3 =
64
+ In Settings->External links, you can now specify URL's that should be either forced to open in a new window, or ignored.
65
+
66
  = 1.2 =
67
  Added: Translation-ready.
68
 
79
  Ready for production.
80
 
81
  = 0.9 =
82
+ Initial release