Page Links To - Version 2.9.4

Version Description

  • Add Hungarian translation.
Download this release

Release Info

Developer markjaquith
Plugin Icon wp plugin Page Links To
Version 2.9.4
Comparing to
See all releases

Code changes from version 2.9.3 to 2.9.4

js/new-tab.coffee CHANGED
@@ -1,4 +1,13 @@
1
- jQuery ($) ->
2
- $( 'body' ).on 'click', 'a', (e) ->
3
- i = $ this
4
- i.attr( 'target', '_blank' ) if $.inArray( i.attr('href'), pltNewTabURLs ) > -1
1
+ # Grab the right copy of jQuery. Plugins and themes that
2
+ # enqueue a custom version of jQuery can go to hell.
3
+ do (window) ->
4
+ jQ = window.jQueryWP or window.jQuery
5
+ jQ ($) ->
6
+ if ( typeof $.fn.on is 'function' )
7
+ $( 'body' ).on 'click', 'a', (e) ->
8
+ i = $ this
9
+ i.attr( 'target', '_blank' ) if $.inArray( i.attr('href'), pltNewTabURLs ) > -1
10
+ else
11
+ # You know what? If you're loading a copy of jQuery that doesn't
12
+ # support `.on()`, FUCK YOU and the donkey you rode in on.
13
+ console?.log 'Page Links To: Some other code has overridden the WordPress copy of jQuery. This is bad. Because of this, Page Links To cannot open links in a new window.'
js/new-tab.js CHANGED
@@ -1,2 +1,2 @@
1
- // Generated by CoffeeScript 1.6.1
2
- (function(){jQuery(function(e){return e("body").on("click","a",function(t){var n;n=e(this);if(e.inArray(n.attr("href"),pltNewTabURLs)>-1)return n.attr("target","_blank")})})}).call(this);
1
+ // Generated by CoffeeScript 1.6.3
2
+ (function(){(function(e){var t;t=e.jQueryWP||e.jQuery;return t(function(e){return typeof e.fn.on=="function"?e("body").on("click","a",function(t){var n;n=e(this);if(e.inArray(n.attr("href"),pltNewTabURLs)>-1)return n.attr("target","_blank")}):typeof console!="undefined"&&console!==null?console.log("Page Links To: Some other code has overridden the WordPress copy of jQuery. This is bad. Because of this, Page Links To cannot open links in a new window."):void 0})})(window)}).call(this);
languages/page-links-to-he_IL.mo CHANGED
Binary file
languages/page-links-to-he_IL.po CHANGED
@@ -2,7 +2,7 @@
2
# This file is distributed under the same license as the Page Links To package.
3
msgid ""
4
msgstr ""
5
- "PO-Revision-Date: 2013-06-22 04:51:59+0000\n"
6
"MIME-Version: 1.0\n"
7
"Content-Type: text/plain; charset=UTF-8\n"
8
"Content-Transfer-Encoding: 8bit\n"
@@ -13,19 +13,19 @@ msgstr ""
13
#: page-links-to.php:209
14
msgctxt "Meta box title"
15
msgid "Page Links To"
16
- msgstr ""
17
18
#: page-links-to.php:230
19
msgid "A custom URL"
20
- msgstr ""
21
22
#: page-links-to.php:233
23
msgid "Open this link in a new tab"
24
- msgstr ""
25
26
#: page-links-to.php:492
27
msgid "<strong>Note</strong>: This content is pointing to a custom URL. Use the &#8220;Page Links To&#8221; box to change this behavior."
28
- msgstr ""
29
30
#: page-links-to.php:228
31
msgid "Point this content to:"
2
# This file is distributed under the same license as the Page Links To package.
3
msgid ""
4
msgstr ""
5
+ "PO-Revision-Date: 2014-03-24 15:07:42+0000\n"
6
"MIME-Version: 1.0\n"
7
"Content-Type: text/plain; charset=UTF-8\n"
8
"Content-Transfer-Encoding: 8bit\n"
13
#: page-links-to.php:209
14
msgctxt "Meta box title"
15
msgid "Page Links To"
16
+ msgstr "הדף מקשר אל"
17
18
#: page-links-to.php:230
19
msgid "A custom URL"
20
+ msgstr "כתובת URL מותאמת אישית"
21
22
#: page-links-to.php:233
23
msgid "Open this link in a new tab"
24
+ msgstr "פתח קישור זה בלשונית חדשה"
25
26
#: page-links-to.php:492
27
msgid "<strong>Note</strong>: This content is pointing to a custom URL. Use the &#8220;Page Links To&#8221; box to change this behavior."
28
+ msgstr "<strong>הערה</strong>: תוכן זה מצביע לכתובת URL מותאמת אישית. השתמש ב &#8220;קישורי עמוד ל&#8221; תיבה כדי לשנות התנהגות זו.."
29
30
#: page-links-to.php:228
31
msgid "Point this content to:"
languages/page-links-to-hu_HU.mo ADDED
Binary file
languages/page-links-to-hu_HU.po ADDED
@@ -0,0 +1,51 @@
1
+ # Translation of Page Links To in Hungarian
2
+ # This file is distributed under the same license as the Page Links To package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2014-03-24 15:07:43+0000\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: GlotPress/0.1\n"
11
+ "Project-Id-Version: Page Links To\n"
12
+
13
+ #: page-links-to.php:209
14
+ msgctxt "Meta box title"
15
+ msgid "Page Links To"
16
+ msgstr "Page Links To"
17
+
18
+ #: page-links-to.php:230
19
+ msgid "A custom URL"
20
+ msgstr "Egyéni link (URL)"
21
+
22
+ #: page-links-to.php:233
23
+ msgid "Open this link in a new tab"
24
+ msgstr "Ezt a linket új fülön nyissa meg a böngésző"
25
+
26
+ #: page-links-to.php:492
27
+ msgid "<strong>Note</strong>: This content is pointing to a custom URL. Use the &#8220;Page Links To&#8221; box to change this behavior."
28
+ msgstr "<strong>Figyelem</strong>: Ez a tartalom egyéni címre mutat. Használd a &#8220;Page Links To&#8221; dobozt, hogy megváltoztasd ezt a beállítást."
29
+
30
+ #: page-links-to.php:228
31
+ msgid "Point this content to:"
32
+ msgstr "Mutasson a tartalom ide:"
33
+
34
+ #: page-links-to.php:229
35
+ msgid "Its normal WordPress URL"
36
+ msgstr "Normál/alapértelmezett WordPress link (URL)"
37
+
38
+ msgid "Page Links To"
39
+ msgstr "Page Links To"
40
+
41
+ msgid "http://txfx.net/wordpress-plugins/page-links-to/"
42
+ msgstr "http://txfx.net/wordpress-plugins/page-links-to/"
43
+
44
+ msgid "Allows you to point WordPress pages or posts to a URL of your choosing. Good for setting up navigational links to non-WP sections of your site or to off-site resources."
45
+ msgstr "A WordPress oldalakat vagy bejegyzéseket egyéni linkre (URL) tudod irányítani. "
46
+
47
+ msgid "Mark Jaquith"
48
+ msgstr "Mark Jaquith"
49
+
50
+ msgid "http://coveredwebservices.com/"
51
+ msgstr "http://coveredwebservices.com/"
page-links-to.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Page Links To
4
Plugin URI: http://txfx.net/wordpress-plugins/page-links-to/
5
Description: Allows you to point WordPress pages or posts to a URL of your choosing. Good for setting up navigational links to non-WP sections of your site or to off-site resources.
6
- Version: 2.9.3
7
Author: Mark Jaquith
8
Author URI: http://coveredwebservices.com/
9
Text Domain: page-links-to
@@ -72,6 +72,8 @@ class CWS_PageLinksTo extends WP_Stack_Plugin {
72
// Non-standard priority hooks
73
$this->hook( 'do_meta_boxes', 20 );
74
$this->hook( 'wp_footer', 19 );
75
76
// Non-standard callback hooks
77
$this->hook( 'load-post.php', 'load_post' );
@@ -119,6 +121,31 @@ class CWS_PageLinksTo extends WP_Stack_Plugin {
119
wp_enqueue_script( 'jquery' );
120
}
121
122
/**
123
* Returns post ids and meta values that have a given key
124
*
3
Plugin Name: Page Links To
4
Plugin URI: http://txfx.net/wordpress-plugins/page-links-to/
5
Description: Allows you to point WordPress pages or posts to a URL of your choosing. Good for setting up navigational links to non-WP sections of your site or to off-site resources.
6
+ Version: 2.9.4
7
Author: Mark Jaquith
8
Author URI: http://coveredwebservices.com/
9
Text Domain: page-links-to
72
// Non-standard priority hooks
73
$this->hook( 'do_meta_boxes', 20 );
74
$this->hook( 'wp_footer', 19 );
75
+ $this->hook( 'wp_enqueue_scripts', 'start_buffer', -9999 );
76
+ $this->hook( 'wp_head', 'end_buffer', 9999 );
77
78
// Non-standard callback hooks
79
$this->hook( 'load-post.php', 'load_post' );
121
wp_enqueue_script( 'jquery' );
122
}
123
124
+ /**
125
+ * Starts a buffer, for rescuing the jQuery object
126
+ */
127
+ function start_buffer() {
128
+ ob_start( array( $this, 'buffer_callback' ) );
129
+ }
130
+
131
+ /**
132
+ * Collects the buffer, and injects a `jQueryWP` JS object as a
133
+ * copy of `jQuery`, so that dumb themes and plugins can't hurt it
134
+ */
135
+ function buffer_callback( $content ) {
136
+ $pattern = "#wp-includes/js/jquery/jquery\.js\?ver=([^']+)'></script>#";
137
+ if ( preg_match( $pattern, $content ) )
138
+ $content = preg_replace( $pattern, '$0<script>jQueryWP = jQuery;</script>', $content );
139
+ return $content;
140
+ }
141
+
142
+ /**
143
+ * Flushes the buffer
144
+ */
145
+ function end_buffer() {
146
+ ob_end_flush();
147
+ }
148
+
149
/**
150
* Returns post ids and meta values that have a given key
151
*
readme.txt CHANGED
@@ -6,8 +6,8 @@ Contributors: markjaquith
6
Donate link: http://txfx.net/wordpress-plugins/donate
7
Tags: page, redirect, link, external link, repoint
8
Requires at least: 3.4
9
- Tested up to: 3.6
10
- Stable tag: 2.9.3
11
12
Lets you make a WordPress page (or other content type) link to an external URL of your choosing, instead of its WordPress URL.
13
@@ -59,6 +59,9 @@ Yes. Linking to `/my-photos.php` is a good idea, as it'll still work if you move
59
60
== Changelog ==
61
62
= 2.9.3 =
63
* Only rely on an internal cache for `wp_list_pages()` processing, and time-limit the cache.
64
* Work around some weird edge cases
6
Donate link: http://txfx.net/wordpress-plugins/donate
7
Tags: page, redirect, link, external link, repoint
8
Requires at least: 3.4
9
+ Tested up to: 4.1
10
+ Stable tag: 2.9.4
11
12
Lets you make a WordPress page (or other content type) link to an external URL of your choosing, instead of its WordPress URL.
13
59
60
== Changelog ==
61
62
+ = 2.9.4 =
63
+ * Add Hungarian translation.
64
+
65
= 2.9.3 =
66
* Only rely on an internal cache for `wp_list_pages()` processing, and time-limit the cache.
67
* Work around some weird edge cases