Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ocean90/public-post-preview
WordPress plugin to allow anonymous users to preview a post before it is published.
https://github.com/ocean90/public-post-preview
wordpress wordpress-plugin
Last synced: 2 days ago
JSON representation
WordPress plugin to allow anonymous users to preview a post before it is published.
- Host: GitHub
- URL: https://github.com/ocean90/public-post-preview
- Owner: ocean90
- Created: 2013-02-06T15:12:32.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-12-15T08:15:43.000Z (14 days ago)
- Last Synced: 2024-12-20T03:09:05.515Z (9 days ago)
- Topics: wordpress, wordpress-plugin
- Language: PHP
- Homepage: https://wordpress.org/plugins/public-post-preview/
- Size: 3.87 MB
- Stars: 53
- Watchers: 8
- Forks: 26
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Public Post Preview
WordPress plugin to share a link to anonymous users to preview a draft of a post (or any other public post type) before it is published.
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.
[
Preview stable version in WordPress Playground
](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/ocean90/public-post-preview/refs/heads/master/.wordpress-org/blueprints/blueprint.json)[
Preview development version in WordPress Playground
](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/ocean90/public-post-preview/refs/heads/master/.wordpress-org/blueprints/blueprint-development.json)
*This plugin was previously maintained by [Matt Martz](http://profiles.wordpress.org/sivel/) and was an idea of [Jonathan Dingman](http://profiles.wordpress.org/jdingman/).*
## Installation
For an installation through WordPress:
1. Go to the 'Add New' plugins screen in your WordPress admin area
1. Search for 'Public Post Preview'
1. Click 'Install Now' and activate the pluginFor a manual installation via FTP:
1. Upload the `public-post-preview` directory to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' screen in your WordPress admin areaTo upload the plugin through WordPress, instead of FTP:
1. Upload the downloaded zip file on the 'Add New' plugins screen (see the 'Upload' tab) in your WordPress admin area and activate.
## Usage
* To enable a public post preview check the box in the document settings. In the classic editor it's in the "Publish" meta box.
* The link will be displayed if the checkbox is checked, you can copy and share the link with your friends.
* To disable a preview uncheck the box again.## Frequently Asked Questions
**I can't find the option for preview links. Where is it?**
The checkbox is only available for non-published posts and once a post was saved as a draft.
**After some time the preview link returns the message "The link has been expired!". Why?**
The plugin generates an URL with an expiring nonce. By default a link "lives" 48 hours. After 48 hours the link is expired and you need to copy and share a new link which is automatically generated on the same place under the editor.
**48 hours are not enough to me. Can I extend the nonce time?**
Yes, of course. Go to Settings > Reading > Public Post Preview and increase the
Expiration Time setting. You can also use the filter `ppp_nonce_life`. Example for 5 days:```php
add_filter( 'ppp_nonce_life', 'my_nonce_life' );
function my_nonce_life() {
return 5 * DAY_IN_SECONDS;
}
```