Public Post Preview

描述

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 site 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.

Previously this plugin was maintained by Matt Martz and was an idea of Jonathan Dingman. Thanks to Hans Dinkelberg for his photo.

Usage

  • To enable a public post preview check the box below the edit post box.
  • The link will be displayed if the checkbox is checked, just copy and share the link with your friends.
  • To disable a preview just uncheck the box.

螢幕截圖

  • Edit Posts Page

安裝

Note: There will be NO settings page.

For an automatic installation through WordPress:

  1. Go to the ‘Add New’ plugins screen in your WordPress admin area
  2. Search for ‘Public Post Preview’
  3. Click ‘Install Now’ and activate the plugin

For a manual installation via FTP:

  1. Upload the public-post-preview directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ screen in your WordPress admin area

To 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.

常見問題

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. You can use the filter ppp_nonce_life. Example for 5 days:

add_filter( 'ppp_nonce_life', 'my_nonce_life' );
function my_nonce_life() {
    return 60 * 60 * 24 * 5; // 5 days
}

Or use the Public Post Preview Configurator.

評價

2021年9月21日
Preview is not working anymore (returns the notice "Error while changing the public preview status") and numerous support posts about the error are going unanswered. Seems like the plugin is not being updated. Too bad since it used to work great.
2021年7月17日
This is one of the very few plugins I install on literally every single site I work on. Absolutely invaluable.
2020年8月9日
Oh boy, I love this plugin. Okay, I think this functionality should really be part of core, but as long as it isn't, this plugin is fantastic. The ability to so easily share a draft post with others has proven itself to be useful to me over and over again.
2020年6月11日
Installed, activated. There are no traces of the plugin in my WP. Perhaps it doesn't work. Perhaps it works but it's so little user friendly that I can't use it.
閱讀全部61個評價

貢獻者及開發者

“Public Post Preview” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

Public Post Preview 外掛目前已有 23 個本地化語言版本。 感謝所有譯者為這個外掛做出的貢獻。

將 Public Post Preview 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

2.9.3 (2021-03-12):

  • Compatibility with WordPress 5.7.
  • Create a fresh preview URL when enabling public preview.
  • Add check for possibly undefined PHP “superglobals”. Props @waviaei.

2.9.2 (2020-10-03):

  • Fix saving of preview status without a previous Ajax request.

2.9.1 (2020-07-25):

  • Improve HTTP status codes for expired/invalid preview links.

For more see CHANGELOG.md.