Skip to content

WP Docsify 2.0 – Multi-language Support & Access Control

Choose a tag to compare

@jeffersonrucu jeffersonrucu released this 15 Jun 23:09
· 31 commits to master since this release
c7bcb64

The second major release of the WP Docsify plugin is here!
This version focuses on internationalization, access control, and structural improvements to make your documentation experience even more flexible and secure.


🌐 Multi-language Support

You can now deliver localized documentation experiences to your users:

  • Language support is now configured via WPDOCSIFY_SUPPORTED_LANGUAGES in config.php.
  • The plugin automatically detects the WordPress site's current locale.
  • Each supported language has its own doc.md inside the /docs/{locale}/ folder.
  • Seamless fallback to English (en_US) if the locale is not supported.
  • Translation files and plugin strings are loaded based on the active locale.

🔒 Access Validation

Keep your documentation secure and user-specific:

  • Only authorized users can access the documentation page.
  • If a user doesn't have permission, they’ll see a friendly Access Denied screen with a button to return to the homepage.
  • No more silent redirects — better feedback, better UX.

image


🛠️ Structural Refactor

Cleaner, more maintainable codebase:

  • New config.php file to centralize constants and configuration.
  • All template files have been moved to a new /templates/ directory.
  • Improved organization for easier development and scalability.

🧪 How to Test

  1. Change your site's language to pt_BR or en_US.
  2. Make sure the correct localized doc.md loads.
  3. Verify translation files load correctly.
  4. Try accessing the documentation with a user that lacks permission — confirm the Access Denied screen appears.
  5. Test templates to ensure nothing is broken after the refactor.

📁 Updated Folder Structure

wp-docsify/
├── config.php
├── src/
│   ├── assets/
│   │   └── style.css
│   ├── docs/
│   │   ├── pt_BR/
│   │   │   ├── README.md
│   │   │   ├── _navbar.md
│   │   │   ├── _sidebar.md
│   │   │   └── ...
│   │   └── en_US/
│   │       └── ...
│   └── templates/
│       ├── access-denied.php
│       └── wp-docsify.php
├── languages/
│   └── *.mo, *.po, *.pot
├── README.md
├── wp-docsify.php
└── ...