Linux 软件免费装
Banner图

Secure Draft Preview Links

开发者 savedprompt
更新时间 2026年5月27日 19:02
PHP版本: 8.0 及以上
WordPress版本: 6.9
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

preview share draft public preview-link

下载

1.0.0

详情介绍:

Secure Draft Preview Links lets you generate a cryptographically secure, unguessable link for any draft post so that people without a WordPress account can read it before it goes live. How it works
  1. Open any draft post or page in the editor.
  2. Check Enable public preview in the Publish panel (Classic Editor) or Status & Visibility panel (Block Editor).
  3. Copy the generated link and share it with anyone.
  4. The recipient can view the draft without logging in.
  5. Uncheck the box or set the expiry to Expired to revoke access immediately.
Editor features Preview Links admin page Security Post list table Technical

安装:

  1. Upload the secure-draft-preview-links folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Open any draft post or page in the editor.

屏幕截图:

  • Classic Editor — Enable public preview checkbox in the Publish meta box.
  • Preview Links admin page — Active tab with paginated table and share buttons.
  • Preview Links admin page — Expired tab.
  • Confirmation dialog before generating a new link.

升级注意事项:

1.0.0 Initial release.

常见问题:

Does this work for custom post types?

Yes. The panel appears on all viewable public post types automatically.

What happens when the link expires?

Visitors see a "Preview Link Expired" page with a 410 HTTP status. The token remains stored so you can see it in the Preview Links page, but it no longer grants access.

Can I share the link with multiple people?

Yes — the link is not tied to any specific user or session.

What happens when the post is published?

The preview token is automatically deleted and visitors are redirected to the live permalink.

Is the preview link secure?

Yes. Each token is a 64-character cryptographically random hex string generated with random_bytes(). It is validated using hash_equals() to prevent timing attacks.

Can I set a custom expiry time?

Yes. Choose Custom time from the expiry dropdown and enter Days, Hours, and Minutes. The link will stop working after that duration. You can also choose Always available for a link that never expires.

How do I revoke access immediately?

Either uncheck Enable public preview (and confirm in the dialog), or select Expired (disable now) from the expiry dropdown. Both invalidate the link instantly.

Can I regenerate the link without disabling it?

Yes. Click Generate new link — after confirming, a new token is created and the old link stops working immediately. The expiry settings are preserved.

Where can I see all my preview links?

Go to Preview Links in the WordPress admin sidebar. It shows all active and expired links across all post types, with share buttons and management actions.

更新日志:

1.0.0