Linux 软件免费装
Banner图

Force Admin Color Scheme

开发者 coffee2code
更新时间 2021年10月15日 13:47
捐献地址: 去捐款
PHP版本: 4.1 及以上
WordPress版本: 5.8
版权: GPLv2 or later
版权网址: 版权信息

标签

admin color scheme coffee2code staging admin colors

下载

1.1.1 2.0.3 1.1 2.0.2 1.2 1.2.1 2.0 2.0.1

详情介绍:

Though it is typically an individually configurable aspect of WordPress, there are times when forcing a single admin color scheme upon all users of a site can be warranted, such as to: Additionally, the plugin removes the "Admin Color Scheme" profile setting from users who don't have the capability to set the admin color scheme globally since being able to set its value gives them the false impression that it may actually apply. Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

安装:

  1. Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically /wp-content/plugins/).
  2. Activate the plugin through the 'Plugins' admin menu in WordPress
  3. As an admin, edit your own profile (Users -> Your Profile) and choose the Admin Color Scheme you want to apply to all users by setting the color scheme for yourself.
  4. Check the "Force this admin color scheme on all users?" checkbox and then save the update to your profile.
  5. Optional: Use the c2c_force_admin_color_scheme filter in custom code to programmatically set the forced admin color scheme with greater control.
  6. Optional: Define the C2C_FORCE_ADMIN_COLOR_SCHEME constant somewhere (such as wp-config.php) if you'd prefer to configure the color that way. Configuring the color in this manner takes precedence over the color as configured via an admin's profile. Also, if the constant is used, the plugin prevents the setting of admin color schemes entirely from within user profiles, including by admins.

屏幕截图:

  • The profile page for an administrative user who has the checkbox to force an admin color scheme on users, though one hasn't been forced yet.
  • The profile page for an administrative user who has the checkbox to force an admin color scheme on users, with a color scheme having been forced.
  • The profile page for an administrative user when the forced admin color scheme is configured via the filter.
  • The profile page for an administrative user when the forced admin color scheme is configured via the constant.
  • The profile page for an administrative user when the forced admin color scheme is incorrectly configured via the constant. A similar warning also appears if the color scheme is incorrectly configured via the filter as well.

升级注意事项:

2.0.3 Trivial update: noted compatibility through WP 5.8+ and minor reorganization and tweaks to unit tests 2.0.2 Trivial update: noted compatibility through WP 5.7+ and updated copyright date (2021) 2.0.1 Trivial update: Restructured unit test file structure, tweaked documentation, and noted compatibility through WP 5.5+. 2.0 Feature update: added support for filter and constant, added stylish inline notices, added validation for color schemes, expanded unit test coverage, renamed a number of functions, added TODO.md file, updated a few URLs to be HTTPS, noted compatibility through WP 5.4+, and more. 1.2.1 Trivial update: noted compatibility through WP 5.3+, made minor documentation tweaks, and updated copyright date (2020) 1.2 Minor update: tweaked plugin initialization, noted compatibility through WP 5.1+, created CHANGELOG.md to store historical changelog outside of readme.txt, and updated copyright date (2019) 1.1.1 Trivial update: updated unit test bootstrap; noted compatibility through WP 4.9+; added README.md; added GitHub link to readme; updated copyright date (2018) 1.1 Recommended update. 1.0 Initial release.

常见问题:

Why isn't everyone seeing the same admin color scheme after activating this plugin?

Have you followed all of the installation instructions? You must configure the forced admin color scheme by setting the color scheme for yourself while also checking the "Force this admin color scheme?" checkbox.

How do I resume letting users pick their own color schemes?

Uncheck the "Force this admin color scheme?" when updating an administrative profile (assuming the plugin's provided constant and/or filter aren't being used), or simply deactivate the plugin.

Can I force different admin color schemes based on the user?

Yes, but only via custom coding by making use of the c2c_force_admin_color_scheme filter. See the documentation for the filter for an example.

What happens if a custom admin color scheme was forced, but later the custom admin color scheme is no longer available (e.g. I deactivated the plugin providing the custom admin color scheme)?

The plugin will recognize that the chosen admin color scheme is no longer valid and will act as if one isn't set. In such a case, users would then see their individually chosen admin color schemes. If the custom admin color scheme becomes available again (before a new existing color scheme is selected as the new scheme to be forced), then the plugin will reinstate it as the forced admin color scheme.

Why is the admin color scheme picker still functional, or even still present at all, when the color scheme is set via the filter or constant and thus cannot be changed via the picker?

Just to be clear, if an admin color scheme is being forced, then non-admininistrative users won't see the admin color scheme picker at all. The plugin does not disable the admin color scheme picker for administrative users even if a value is directly configured in code (via the constant or the filter) so that the admin color schemes can still be seen and previewed in case an admin user wants to evaluate alternatives.

Does this plugin include unit tests?

Yes.

更新日志:

2.0.3 (2021-10-14) 2.0.2 (2021-04-11) 2.0.1 (2020-09-03)