Version Description
- Newsletter
Download this release
Release Info
| Developer | markjaquith |
| Plugin | |
| Version | 2.11.2 |
| Comparing to | |
| See all releases | |
Code changes from version 2.11.1 to 2.11.2
- page-links-to.php +13 -25
- readme.txt +4 -1
page-links-to.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
* Plugin Name: Page Links To
|
| 8 |
* Plugin URI: http://txfx.net/wordpress-plugins/page-links-to/
|
| 9 |
* 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.
|
| 10 |
-
* Version: 2.11.
|
| 11 |
* Author: Mark Jaquith
|
| 12 |
* Author URI: https://coveredweb.com/
|
| 13 |
* Text Domain: page-links-to
|
|
@@ -49,10 +49,10 @@ class CWS_PageLinksTo {
|
|
| 49 |
const TARGET_META_KEY = '_links_to_target';
|
| 50 |
const VERSION_KEY = 'txfx_plt_schema_version';
|
| 51 |
const DISMISSED_NOTICES = 'page_links_dismissed_options';
|
| 52 |
-
const MESSAGE_ID =
|
| 53 |
-
const
|
| 54 |
const FILE = __FILE__;
|
| 55 |
-
const CSS_JS_VERSION = '2.11.
|
| 56 |
|
| 57 |
/**
|
| 58 |
* Whether to replace WP links with their specified URLs.
|
|
@@ -373,22 +373,6 @@ class CWS_PageLinksTo {
|
|
| 373 |
<p><label for="cws-links-to-new-tab"><input type="checkbox" name="cws_links_to_new_tab" id="cws-links-to-new-tab" value="_blank" <?php checked( (bool) self::get_target( $post->ID ) ); ?>> <?php _e( 'Open this link in a new tab', 'page-links-to' ); ?></label></p>
|
| 374 |
</div>
|
| 375 |
|
| 376 |
-
<?php if ( true ) { ?>
|
| 377 |
-
<style>
|
| 378 |
-
#cws-links-to-survey {
|
| 379 |
-
border: 1px solid #eee;
|
| 380 |
-
}
|
| 381 |
-
|
| 382 |
-
#cws-links-to-survey h3, #cws-links-to-survey p {
|
| 383 |
-
margin: 1em;
|
| 384 |
-
}
|
| 385 |
-
</style>
|
| 386 |
-
<div id="cws-links-to-survey">
|
| 387 |
-
<h3>New Features Coming Soon!</h3>
|
| 388 |
-
<p>Do you have a minute? <a target="_blank" href="<?php echo self::SURVEY_URL; ?>">Please take this quick survey</a> and help me decide what features to build next!</p>
|
| 389 |
-
</div>
|
| 390 |
-
<?php } ?>
|
| 391 |
-
|
| 392 |
<script src="<?php echo self::get_url() . 'js/page-links-to.min.js?v=' . self::CSS_JS_VERSION; ?>"></script>
|
| 393 |
<?php
|
| 394 |
}
|
|
@@ -714,10 +698,7 @@ class CWS_PageLinksTo {
|
|
| 714 |
* @return bool Whether to display the message.
|
| 715 |
*/
|
| 716 |
public static function should_display_message() {
|
| 717 |
-
|
| 718 |
-
$end_time = $start_time + WEEK_IN_SECONDS;
|
| 719 |
-
|
| 720 |
-
return time() > $start_time && time() < $end_time && ! self::has_dismissed_notice( self::MESSAGE_ID ) && current_user_can( 'manage_options' );
|
| 721 |
}
|
| 722 |
|
| 723 |
/**
|
|
@@ -762,7 +743,13 @@ class CWS_PageLinksTo {
|
|
| 762 |
*/
|
| 763 |
public static function notify_generic() {
|
| 764 |
?>
|
| 765 |
-
<div id="page-links-to-notification" class="notice updated is-dismissible"><?php _e( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 766 |
<script>
|
| 767 |
(function($){
|
| 768 |
var $plt = $('#page-links-to-notification');
|
|
@@ -777,6 +764,7 @@ class CWS_PageLinksTo {
|
|
| 777 |
});
|
| 778 |
})
|
| 779 |
.on('click', '.plt-dismiss', function(e){
|
|
|
|
| 780 |
$(this).parents('.notice').first().find('.notice-dismiss').click();
|
| 781 |
});
|
| 782 |
})(jQuery);
|
| 7 |
* Plugin Name: Page Links To
|
| 8 |
* Plugin URI: http://txfx.net/wordpress-plugins/page-links-to/
|
| 9 |
* 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.
|
| 10 |
+
* Version: 2.11.2
|
| 11 |
* Author: Mark Jaquith
|
| 12 |
* Author URI: https://coveredweb.com/
|
| 13 |
* Text Domain: page-links-to
|
| 49 |
const TARGET_META_KEY = '_links_to_target';
|
| 50 |
const VERSION_KEY = 'txfx_plt_schema_version';
|
| 51 |
const DISMISSED_NOTICES = 'page_links_dismissed_options';
|
| 52 |
+
const MESSAGE_ID = 4;
|
| 53 |
+
const NEWSLETTER_URL = 'https://pages.convertkit.com/8eb23c1339/1ce4614706';
|
| 54 |
const FILE = __FILE__;
|
| 55 |
+
const CSS_JS_VERSION = '2.11.2';
|
| 56 |
|
| 57 |
/**
|
| 58 |
* Whether to replace WP links with their specified URLs.
|
| 373 |
<p><label for="cws-links-to-new-tab"><input type="checkbox" name="cws_links_to_new_tab" id="cws-links-to-new-tab" value="_blank" <?php checked( (bool) self::get_target( $post->ID ) ); ?>> <?php _e( 'Open this link in a new tab', 'page-links-to' ); ?></label></p>
|
| 374 |
</div>
|
| 375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
<script src="<?php echo self::get_url() . 'js/page-links-to.min.js?v=' . self::CSS_JS_VERSION; ?>"></script>
|
| 377 |
<?php
|
| 378 |
}
|
| 698 |
* @return bool Whether to display the message.
|
| 699 |
*/
|
| 700 |
public static function should_display_message() {
|
| 701 |
+
return ! self::has_dismissed_notice( self::MESSAGE_ID ) && current_user_can( 'manage_options' );
|
|
|
|
|
|
|
|
|
|
| 702 |
}
|
| 703 |
|
| 704 |
/**
|
| 743 |
*/
|
| 744 |
public static function notify_generic() {
|
| 745 |
?>
|
| 746 |
+
<div id="page-links-to-notification" class="notice updated is-dismissible"><h3><?php _e( 'Page Links To', 'page-links-to' ); ?></h3>
|
| 747 |
+
<p><?php _e( 'Thank you for using Page Links To!', 'page-links-to' ); ?></p>
|
| 748 |
+
<p><?php _e( 'I’ve been maintaining this plugin since 2005, and I love seeing the different ways people use it.', 'page-links-to' ); ?></p>
|
| 749 |
+
<p>— <i>Mark Jaquith</i></p>
|
| 750 |
+
<p><?php printf( __( 'P.S. Can I keep you up-to-date about <a target="_blank" href="%s" class="plt-dismiss">upcoming features & updates</a>?', 'page-links-to' ), esc_url( self::NEWSLETTER_URL ) ); ?></p>
|
| 751 |
+
<p><a class="button plt-dismiss" target="_blank" href="<?php echo esc_url( self::NEWSLETTER_URL ); ?>"><?php _e( 'Give Me Updates', 'page-links-to' ); ?></a> <small><a href="javascript:void(0)" class="plt-dismiss"><?php _e( 'No thanks', 'page-links-to' ); ?></a></small></p>
|
| 752 |
+
</div>
|
| 753 |
<script>
|
| 754 |
(function($){
|
| 755 |
var $plt = $('#page-links-to-notification');
|
| 764 |
});
|
| 765 |
})
|
| 766 |
.on('click', '.plt-dismiss', function(e){
|
| 767 |
+
e.preventDefault();
|
| 768 |
$(this).parents('.notice').first().find('.notice-dismiss').click();
|
| 769 |
});
|
| 770 |
})(jQuery);
|
readme.txt
CHANGED
|
@@ -5,7 +5,7 @@ Donate link: http://txfx.net/wordpress-plugins/donate
|
|
| 5 |
Tags: page, redirect, link, external link, repoint
|
| 6 |
Requires at least: 4.8
|
| 7 |
Tested up to: 4.9.6
|
| 8 |
-
Stable tag: 2.11.
|
| 9 |
|
| 10 |
Lets you make a WordPress page (or port or other content type) link to a URL of your choosing (on your site, or on another site), instead of its normal WordPress URL.
|
| 11 |
|
|
@@ -64,6 +64,9 @@ You can contribute (or report bugs) on [Github](https://github.com/markjaquith/p
|
|
| 64 |
|
| 65 |
== Changelog ==
|
| 66 |
|
|
|
|
|
|
|
|
|
|
| 67 |
= 2.11.1 =
|
| 68 |
* Restore PHP 5.3 compatibility, broken in 2.11.0
|
| 69 |
|
| 5 |
Tags: page, redirect, link, external link, repoint
|
| 6 |
Requires at least: 4.8
|
| 7 |
Tested up to: 4.9.6
|
| 8 |
+
Stable tag: 2.11.2
|
| 9 |
|
| 10 |
Lets you make a WordPress page (or port or other content type) link to a URL of your choosing (on your site, or on another site), instead of its normal WordPress URL.
|
| 11 |
|
| 64 |
|
| 65 |
== Changelog ==
|
| 66 |
|
| 67 |
+
= 2.11.2 =
|
| 68 |
+
* Newsletter
|
| 69 |
+
|
| 70 |
= 2.11.1 =
|
| 71 |
* Restore PHP 5.3 compatibility, broken in 2.11.0
|
| 72 |
|
