Linux 软件免费装
Banner图

Secure Role-Restricted Draft Previews

开发者 pixypuala
更新时间 2025年10月2日 23:00
PHP版本: 8.1 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

preview security roles access control drafts

下载

1.0.0 1.0.1

详情介绍:

Why this plugin? WordPress core preview links work well for editors, and Public Post Preview shares via anonymous nonces. This plugin adds a missing middle ground: draft previews that are secured by authentication and access control lists (ACLs) — role-based, user-specific, or per-email tokens — plus analytics and a one-click revoke-all. Universal Compatibility Works seamlessly with: How it works Each generated link has a unique token, TTL, and ACL: When a link is visited, SRPL validates the token, expiry, and ACL, then renders the draft with your theme's header/footer. Events are logged (when enabled) to a small custom table (wp_srpl_events) with hashed IP for privacy. Privacy Developer Friendly

安装:

  1. Upload the plugin folder to /wp-content/plugins/ or install from WP.org.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Go to any Post/Page editor → sidebar meta box "Secure Preview Links".
  4. Generate a link (choose Mode + TTL). Copy the URL (for email mode, copy the per‑email URLs shown).
  5. Optional: configure defaults in Settings → Secure Previews.

升级注意事项:

1.0.1 Updated plugin assets for WordPress.org directory. All persistent data is stored in the WordPress database or in a subfolder of the uploads directory. No plugin-folder writes. No code editing required. 1.0.0 Initial release. All persistent data is stored in the WordPress database or in a subfolder of the uploads directory. No plugin-folder writes. No code editing required.

常见问题:

Is this the same as Public Post Preview?

No. That plugin makes anonymous, expiring links. SRPL requires login for role/user modes and supports per‑email tokens. It also offers per‑link analytics and revoke‑all functionality.

Can I restrict by custom roles?

Yes. All editable roles are available. You can also filter supported post types via srpl_supported_post_types.

Does it support Custom Post Types?

Yes. Add your CPT slug to the srpl_supported_post_types filter: add_filter('srpl_supported_post_types', function($post_types) { $post_types[] = 'product'; // Add custom post type return $post_types; });

Is this plugin compatible with Full Site Editing (FSE), Block Themes, and Classic Themes?

Yes! Our plugin works seamlessly with:

  • Full Site Editing (FSE) themes
  • Block themes (modern WordPress)
  • Classic PHP-based themes
  • All page builders including Elementor, WPBakery, Divi, etc.
  • WooCommerce product drafts
  • Any CSS framework including Tailwind CSS v4+ The preview functionality renders drafts exactly as they would appear on your live site, regardless of your theme or page builder.

Will this leak draft content to search engines?

No. Links are opaque tokens; access is gated and previews are not discoverable by search engines.

How are analytics stored?

A lightweight table wp_srpl_events stores link id, post id, hashed IP, UA, user id (if logged), outcome, and timestamp. You can disable this in settings.

Can I change the default expiration time?

Yes, use the srpl_default_ttl_hours filter: add_filter('srpl_default_ttl_hours', function($hours) { return 168; // 1 week });

How secure are the preview links?

Very secure. Links use cryptographically strong tokens that are non-guessable. Email tokens are deterministic but secure, using your site's nonce salt.

更新日志:

1.0.1 1.0.0