summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2017-05-05 17:29:26 -0400
committerYury German <blueknight@gentoo.org>2017-05-05 17:29:26 -0400
commita751233efc6e756083926dfaeaf6eefe718b5f76 (patch)
tree83373c83696d56ab1f0a91615236b2e7b7674477 /plugins/public-post-preview
parentUpdate wordpress-mobile-pack 2.2.10 (diff)
downloadblogs-gentoo-a751233efc6e756083926dfaeaf6eefe718b5f76.tar.gz
blogs-gentoo-a751233efc6e756083926dfaeaf6eefe718b5f76.tar.bz2
blogs-gentoo-a751233efc6e756083926dfaeaf6eefe718b5f76.zip
Update Aksimet v3.3.1, Jetpack v 4.9, Public Post Preview v 2.6.0
Diffstat (limited to 'plugins/public-post-preview')
-rw-r--r--plugins/public-post-preview/public-post-preview.php10
-rw-r--r--plugins/public-post-preview/readme.txt21
2 files changed, 14 insertions, 17 deletions
diff --git a/plugins/public-post-preview/public-post-preview.php b/plugins/public-post-preview/public-post-preview.php
index 56bd2dd3..5130a0a1 100644
--- a/plugins/public-post-preview/public-post-preview.php
+++ b/plugins/public-post-preview/public-post-preview.php
@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: Public Post Preview
- * Version: 2.5.0
+ * Version: 2.6.0
* Description: Enables you to give a link to anonymous users for public preview of any post type before it is published.
* Author: Dominik Schilling
* Author URI: http://wphelper.de/
@@ -13,7 +13,7 @@
*
* Previously (2009-2011) maintained by Jonathan Dingman and Matt Martz.
*
- * Copyright (C) 2012-2016 Dominik Schilling
+ * Copyright (C) 2012-2017 Dominik Schilling
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -217,7 +217,7 @@ class DS_Public_Post_Preview {
* @param WP_Post $post The post object.
* @return string The generated public preview link.
*/
- private static function get_preview_link( $post ) {
+ public static function get_preview_link( $post ) {
if ( 'page' == $post->post_type ) {
$args = array(
'page_id' => $post->ID,
@@ -420,6 +420,10 @@ class DS_Public_Post_Preview {
$query->is_singular() &&
$query->get( '_ppp' )
) {
+ if ( ! headers_sent() ) {
+ nocache_headers();
+ }
+
add_filter( 'posts_results', array( __CLASS__, 'set_post_to_publish' ), 10, 2 );
}
diff --git a/plugins/public-post-preview/readme.txt b/plugins/public-post-preview/readme.txt
index e26e378e..c2867091 100644
--- a/plugins/public-post-preview/readme.txt
+++ b/plugins/public-post-preview/readme.txt
@@ -1,10 +1,9 @@
=== Public Post Preview ===
Contributors: ocean90
Tags: public, post, preview, posts, custom post types, draft
-Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VR8YU922B7K46
Requires at least: 3.5
-Tested up to: 4.5
-Stable tag: 2.5.0
+Tested up to: 4.7
+Stable tag: 2.6.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -16,17 +15,7 @@ Enables you to give a link to anonymous users for public preview of a post (or a
Have you ever been writing a post with the help of someone who does not have access to your blog and needed to give them the ability to preview it before publishing? This plugin takes care of that by generating an URL with an expiring nonce that can be given out for public preview.
-**Sounds pretty good? Install now!**
-
-*Previously this plugin was maintained by [Matt Martz](http://profiles.wordpress.org/sivel/) and was an idea of [Jonathan Dingman](http://profiles.wordpress.org/jdingman/).*
-
-= Feedback =
-If you want, you can drop me a line @[ocean90](http://twitter.com/ocean90) on Twitter or @[Dominik Schilling](https://plus.google.com/+DominikSchilling/) on Google+.
-
-= More =
-Try also some of my [other plugins](http://profiles.wordpress.org/users/ocean90).
-
-*Thanks to Hans Dinkelberg for his [photo](http://www.flickr.com/photos/uitdragerij/7516234430/).*
+*Previously this plugin was maintained by [Matt Martz](http://profiles.wordpress.org/sivel/) and was an idea of [Jonathan Dingman](http://profiles.wordpress.org/jdingman/). Thanks to Hans Dinkelberg for his [photo](http://www.flickr.com/photos/uitdragerij/7516234430/).*
== Installation ==
@@ -82,6 +71,10 @@ function my_nonce_life() {
Or use the [Public Post Preview Configurator](https://wordpress.org/plugins/public-post-preview-configurator/).
== Change Log ==
+= 2.6.0 (2017-04-27): =
+* Make `DS_Public_Post_Preview::get_preview_link()` public. Props [@rcstr](https://github.com/rcstr).
+* Send no-cache headers for public post previews.
+
= 2.5.0 (2016-04-05): =
* Auto select preview link on focus. Props [@JeroenSormani](https://github.com/JeroenSormani).
* Remove preview status from posts which are trashed or after scheduled posts are published.