Priskribo
Erdo Draft Links lets you generate a secure, token-based URL for any draft, private, or published post or page. Share it with clients, reviewers, or collaborators — they can read the content without needing a WordPress account.
Think of it like Google Docs’ “Anyone with the link can view” — but for WordPress.
How it works
- Open any post or page in the editor (Block Editor or Classic Editor).
- Click “Generate Draft Link” in the sidebar panel or meta box.
- Choose an expiry: 24 hours, 48 hours, 7 days, or never.
- Share the link. Recipients can view the content — no login needed.
Features
- Works with both the Block Editor (Gutenberg) and the Classic Editor
- Supports posts, pages, and any custom post type via a filter
- Secure 32-character cryptographic tokens — brute-force resistant
- Configurable expiry: 24 hours, 48 hours, 7 days, or no expiry
- View count tracking per link
- Visitors can leave name + feedback on the preview — collected in a “Feedback” tab in the admin and emailed to you
- Revoke or regenerate any link at any time
- Tokens are stored hashed in the database — raw tokens are never stored after the redirect
- Two-step flow: token URL cookie clean permalink (token never appears in browser history)
- No external API calls, no phone-home, no subscriptions
- Translation-ready (English default, Turkish included)
Developer Notes
Developers can add support for custom post types using the erdo_draft_links_supported_post_types filter:
add_filter( 'erdo_draft_links_supported_post_types', function( $types ) {
$types[] = 'product';
return $types;
} );
Source Code
The full source code including build tools is included in the plugin’s assets/js/src/ directory.
Ekrankopioj



Instalo
- Upload the
erdo-draft-linksfolder to the/wp-content/plugins/directory. - Activate the plugin through the Plugins menu in WordPress.
- Open any post or page and find the Erdo Draft Links panel in the editor sidebar or meta box.
OD
-
Does this work with custom post types?
-
Yes. By default Erdo Draft Links supports posts and pages. Add more post types using the
erdo_draft_links_supported_post_typesfilter. -
Yes. Tokens are 32 characters of cryptographic randomness generated by WordPress’s built-in
wp_generate_password. The raw token appears in the URL only once — subsequent visits use a signed HttpOnly cookie. Tokens are stored as SHA-256 HMAC hashes in the database. -
What happens when a link expires?
-
The recipient sees a clear message: “This draft link has expired and is no longer accessible.” The post remains a draft — nothing is published.
-
Can I have multiple active links for the same post?
-
Currently one active link per post. Regenerating creates a new token and resets the view count.
-
Does this work with password-protected posts?
-
No. Erdo Draft Links is designed for draft and private posts. Password-protected posts use WordPress’s own mechanism.
-
Does this plugin affect site performance?
-
Erdo Draft Links only runs on requests that include a
?erdo_token=parameter or a valid session cookie. Normal site traffic is not affected.
Pritaksoj
Kontribuantoj k. programistoj
“Erdo Draft Links – Share Drafts, Client Preview, Secure Link” estas liberkoda programo. La sekvaj homoj kontribuis al la kromprogramo.
Kontribuantoj“Erdo Draft Links – Share Drafts, Client Preview, Secure Link” has been translated into 1 locale. Thank you to the translators for their contributions.
Traduki “Erdo Draft Links – Share Drafts, Client Preview, Secure Link” en vian lingvon.
Ĉu interesita en programado?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Ŝanĝprotokolo
1.1.0
- New: Visitors can leave name + feedback on a shared draft preview; submissions appear under the new “Feedback” tab in the Erdo Draft Links admin page and are emailed to the site admin.
- New: The Links Manager table now has a “Link” column with a hidden-by-default reveal button and one-click copy for the generated draft link.
- Fix: Page builder content (Elementor and others) now renders correctly on shared draft preview links for non-logged-in visitors.
- Fix: The “View Link” row action was renamed to “View Page” (it opens the post, not the draft link) to avoid confusion with the new “Link” column.
- Fix: The Block Editor sidebar no longer shows a stale draft link after it has been revoked or regenerated elsewhere.
- Fix: Caching plugins (e.g. LiteSpeed Cache) no longer serve stale draft previews or feedback status to visitors after a link is revoked or feedback status changes.
- Fix: The feedback widget’s appearance (colors, sizes, fonts, spacing) is now fully isolated from the active theme so it looks the same on every site.
1.0.1
- Fix: Replace deprecated
current_time('timestamp')withtime()for correct UTC handling.
1.0.0
- Initial release.
