Previous Name: Sharable Password Protected Posts
WordPress plugin to share a link to anonymous users to view private and password protected posts (or any other public post type).
This plugin generates secret URLs (similar to Google Docs and other cloud services) for posts so you can share them with not-logged-in users without having to share an extra password with them.
Inspired by Public Post Preview
Contributions are welcome. I just want to note, that the scope of this plugin is explicitly limited and I am not planning on extending it with a lot of features. Quality of live improvements, bug fixes, security fixes and code-quality improvements/tests are of course welcome.
The local development environment is based on DDEV.
After the first setup, remove the ##ddev-generated header from the wp-config.php file and change the ddev-include code
to
$ddev_settings = __DIR__ . '/wp-config-ddev.php';
if ( getenv( 'IS_DDEV_PROJECT' ) == 'true' && is_readable( $ddev_settings ) ) {
require_once( $ddev_settings );
}It is recommended to run all tasks inside the ddev container.
- PHP Code Style can be checked/fix with
composer run phpcs/ `composer run phpcs:fix - PHPStan can be checked with
composer run phpstan - PHP Code can be checked for quality via
composer run code-quality - Tests are implemented with WP-Browser and Codeception
- Composer scripts exist for the different test suites and for fast/slow tests
- JS/CSS Code can be formatted via
npm run format - JS/CSS Code can be built via
npm run build - Translations can be collected/built via
composer run i18n - A full plugin-zip can be built via
composer run build
- Run linting, phpcs, phpcs:fix + phpstan
- Update version
- in main plugin file headers (
/sharable-password-protected-posts.php) - in
package.json - in
composer.json+ runddev composer update -- --lockkk - stable tag in
readme.txt
- in main plugin file headers (
- Add changelog entry in
readme.txtandCHANGELOG.md - Optional: Update WordPress
Tested up toandRequires at leastin main plugin file headers (sharable-password-protected-posts.php/readme.txt) - Run
(ddev) composer i18nto update translation files - Create PR / merge into main -> will trigger
buildanddeploy-wporgCI jobs - Create a new release with a new tag in main
vX.Y.Zwith changelog
