Linux 软件免费装
Banner图

Z Authorized Downloads

开发者 zodannl
martenmoolenaar
更新时间 2025年11月5日 00:36
PHP版本: 5.5 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

files attachments authorization downloads protected downloads

下载

1.2.4

详情介绍:

This plugin allows site admins to protect specific attachment file types (e.g. Pdf, Doc(x)) from direct access. Instead, the files are served through WordPress, allowing you to check if a user is logged in or has the required permissions before granting access. Features:

安装:

  1. Upload the plugin files to /wp-content/plugins/z-authorized-downloads/ or install via the Plugins screen.
  2. Activate the plugin through the 'Plugins' screen.
  3. Go to Settings → Authorized Downloads to set which file types should be protected and which roles can download protected files
  4. Mark attachments as "Authorized only" in the Media Library to restrict access.
  5. Optionally, override the default permitted roles per attachment in the Media Library.

屏幕截图:

  • Media modal showing the "Authorized only" checkbox.

升级注意事项:

1.1.1 You must visit the settings page after upgrading to ensure .htaccess rules are regenerated with your chosen file types.

常见问题:

Can I customize the authorization logic?

Yes. The plugin checks if the user is logged in by default, but you can extend handle_protected_request() to add role checks or other conditions.

What happens to unprotected files?

Files that are not marked as "Authorized only" will still be directly accessible by URL.

Do I need to manually edit .htaccess?

No. The plugin will manage the .htaccess rules for you when you save settings.

Do you have plans to improve the plugin?

We currently have on our roadmap:

  • Adding information to the media overview screen.
  • Make the plugin pluggable.
  • Adding a custom capability to manage which users can edit settings (both general and per file).
  • Adding more translations. If you have a feature suggestion, send us an email at plugins@zodan.nl.

更新日志:

1.2.4 1.2.3 1.2.2 1.2.1 1.2.0 1.1.1 1.0.0