soderlind/editor-can-manage-privacy-options
Composer 安装命令:
composer require soderlind/editor-can-manage-privacy-options
包简介
Grants WordPress Editors the ability to manage privacy settings and access privacy admin pages
关键字:
README 文档
README
A lightweight WordPress plugin that grants the Editor role access to manage site Privacy Settings — capabilities normally restricted to Administrators.
Why This Plugin?
By default, only Administrators can configure the site's privacy policy settings (selecting the Privacy Policy page, accessing the privacy guide, etc.). This plugin safely extends that access to trusted Editors without broadly elevating their administrative capabilities.
Features
- Maps the core
manage_privacy_optionsmeta capability to an Editor-level base capability (edit_pages, filterable) - Adds the Privacy submenu under Settings for Editors (only if core hasn’t already exposed it)
- Prevents duplicate "Privacy" menu entries (CSS + defensive late cleanup)
- Request‑scoped temporary elevation only on privacy-related pages
- Avoids granting unrelated high-risk capabilities like
manage_options - Heuristic admin detection (treats users with high-level caps as admins)
How It Works (Technical)
Hooks used:
map_meta_cap– remapsmanage_privacy_optionsto a safer base capabilityadmin_menu– adds the Privacy menu (and late duplicate cleanup)admin_init– sets up request-scoped access if viewing privacy pagesuser_has_cap– temporarily grantsmanage_optionsonly when core checks it on privacy pagesadmin_head,admin_print_styles,in_admin_footer– inject CSS to hide duplicate submenu entries
Capability Mapping Filter
You can customize the base capability via the epm_privacy_base_cap filter:
add_filter( 'epm_privacy_base_cap', function( $default ) { return 'edit_others_posts'; // or another appropriate capability } );
Installation
-
Quick Install
- Download
editor-can-manage-privacy-options.zip - Upload via Plugins > Add New > Upload Plugin
- Activate the plugin.
- Download
-
Composer Install
composer require soderlind/editor-can-manage-privacy-options
-
Updates
- Plugin updates are handled automatically via GitHub. No need to manually download and install updates.
Requirements
- WordPress 6.5+
- PHP 8.2+
Security Notes
- Scope limited strictly to privacy-related pages
- No persistent role modification; all adjustments are dynamic
- Defensive checks prevent privilege creep into unrelated admin areas
FAQ
Does this let Editors change other site-wide admin options?
No. Only privacy-related access is facilitated.
Can I change which role gets access?
Yes, by mapping to a different capability using the epm_privacy_base_cap filter.
Why inject CSS for duplicates?
Rare timing edge cases can produce temporary duplicate menu entries. CSS plus late cleanup ensures a clean UI.
Does it work in multisite?
Yes in principle; network-level elevated capabilities mark a user as effectively admin and bypass the editor logic.
Development
Pull requests and issues welcome.
License
MIT — see LICENSE file.
Author
soderlind/editor-can-manage-privacy-options 适用场景与选型建议
soderlind/editor-can-manage-privacy-options 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 09 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「wp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 soderlind/editor-can-manage-privacy-options 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 soderlind/editor-can-manage-privacy-options 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 soderlind/editor-can-manage-privacy-options 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Must-use plugin integrating WordPress with the Upsun platform: environment awareness, router-cache friendliness, safe preview clones, deploy migrations, Site Health checks, and a wp upsun CLI command.
Inertia.js server-side adapter for PHP. Handles full visits, Inertia XHR visits, asset-version 409 handshakes and partial reloads. Framework-agnostic, with transparent WordPress integration.
Adds Cache-Tag HTTP response headers for singular WordPress content and purges Cloudflare by tag when content changes.
AI Chatbot & Helpdesk Agent for WooCommerce. Connects your store to Egentify for AI-powered chat, order tracking, email, and ticketing.
MIDDAG's reference architecture for a WordPress plugin — composes the OSS framework/wordpress/ui libraries end to end.
Assets helper package for the Hybrid Core framework.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-09-18
