Version Description
(2009-03-30): = * Fix preview URL for scheduled posts on sites with a permalink other than default activated.
Download this release
Release Info
| Developer | sivel |
| Plugin | |
| Version | 1.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1 to 1.2
- public-post-preview.php +5 -5
- readme.txt +6 -3
public-post-preview.php
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Public Post Preview
|
| 4 |
-
Plugin URI: http://sivel.net/wordpress/
|
| 5 |
Description: Enables you to give a link to anonymous users for public preview of a post before it is published.
|
| 6 |
-
Author: Matt Martz
|
| 7 |
-
Version: 1.
|
| 8 |
Author URI: http://sivel.net/
|
| 9 |
*/
|
| 10 |
|
|
@@ -62,7 +62,7 @@ class Public_Post_Preview {
|
|
| 62 |
$this->id = (int) $post->ID;
|
| 63 |
$nonce = $this->create_nonce('public_post_preview_' . $this->id);
|
| 64 |
|
| 65 |
-
$url = htmlentities(add_query_arg(array('preview' => 'true', 'preview_id' => $this->id, 'public' => true, 'nonce' => $nonce),
|
| 66 |
|
| 67 |
echo "<p><a href='$url'>$url</a><br /><br />\r\n";
|
| 68 |
}
|
|
@@ -98,7 +98,7 @@ class Public_Post_Preview {
|
|
| 98 |
|
| 99 |
if ( false == $this->verify_nonce($_GET['nonce'], 'public_post_preview_' . $this->id) || isset($preview_posts[$this->id]) )
|
| 100 |
wp_die('You do not have permission to publicly preview this post.');
|
| 101 |
-
|
| 102 |
add_filter('the_posts', array(&$this, 'insert_preview'));
|
| 103 |
}
|
| 104 |
}
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Public Post Preview
|
| 4 |
+
Plugin URI: http://sivel.net/wordpress/public-post-preview/
|
| 5 |
Description: Enables you to give a link to anonymous users for public preview of a post before it is published.
|
| 6 |
+
Author: Matt Martz</a> and <a href='http://www.ginside.com/'>Jonathan Dingman</a>
|
| 7 |
+
Version: 1.2
|
| 8 |
Author URI: http://sivel.net/
|
| 9 |
*/
|
| 10 |
|
| 62 |
$this->id = (int) $post->ID;
|
| 63 |
$nonce = $this->create_nonce('public_post_preview_' . $this->id);
|
| 64 |
|
| 65 |
+
$url = htmlentities(add_query_arg(array('p' => $this->id, 'preview' => 'true', 'preview_id' => $this->id, 'public' => true, 'nonce' => $nonce), get_option('home') . '/'));
|
| 66 |
|
| 67 |
echo "<p><a href='$url'>$url</a><br /><br />\r\n";
|
| 68 |
}
|
| 98 |
|
| 99 |
if ( false == $this->verify_nonce($_GET['nonce'], 'public_post_preview_' . $this->id) || isset($preview_posts[$this->id]) )
|
| 100 |
wp_die('You do not have permission to publicly preview this post.');
|
| 101 |
+
|
| 102 |
add_filter('the_posts', array(&$this, 'insert_preview'));
|
| 103 |
}
|
| 104 |
}
|
readme.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
=== Public Post Preview ===
|
| 2 |
-
Contributors: sivel
|
| 3 |
Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=C3UA7TDWM4NLQ&lc=US&item_name=Donations%20for%20Sivel%2enet%20WordPress%20Plugins&cn=Add%20special%20instructions%20to%20the%20seller&no_shipping=1&rm=1&return=http%3a%2f%2fsivel%2enet%2fthanks¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
| 4 |
Tags: public-post-preview, public, post, preview, posts
|
| 5 |
Requires at least: 2.7
|
| 6 |
-
Tested up to: 2.
|
| 7 |
-
Stable tag: 1.
|
| 8 |
|
| 9 |
Enables you to give a link to anonymous users for public preview of a post before it is published.
|
| 10 |
|
|
@@ -40,6 +40,9 @@ NOTE: See "Other Notes" for Upgrade and Usage Instructions as well as other pert
|
|
| 40 |
|
| 41 |
== Changelog ==
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
= 1.1 (2009-03-11): =
|
| 44 |
* Don't limit public previews to posts in draft or pending status. Just exclude posts in publish status.
|
| 45 |
|
| 1 |
=== Public Post Preview ===
|
| 2 |
+
Contributors: sivel, jdingman
|
| 3 |
Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=C3UA7TDWM4NLQ&lc=US&item_name=Donations%20for%20Sivel%2enet%20WordPress%20Plugins&cn=Add%20special%20instructions%20to%20the%20seller&no_shipping=1&rm=1&return=http%3a%2f%2fsivel%2enet%2fthanks¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
| 4 |
Tags: public-post-preview, public, post, preview, posts
|
| 5 |
Requires at least: 2.7
|
| 6 |
+
Tested up to: 2.9
|
| 7 |
+
Stable tag: 1.2
|
| 8 |
|
| 9 |
Enables you to give a link to anonymous users for public preview of a post before it is published.
|
| 10 |
|
| 40 |
|
| 41 |
== Changelog ==
|
| 42 |
|
| 43 |
+
= 1.2 (2009-03-30): =
|
| 44 |
+
* Fix preview URL for scheduled posts on sites with a permalink other than default activated.
|
| 45 |
+
|
| 46 |
= 1.1 (2009-03-11): =
|
| 47 |
* Don't limit public previews to posts in draft or pending status. Just exclude posts in publish status.
|
| 48 |
|
