Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
Add Admin CSS icon

Add Admin CSS

v2.0.1
by Scott Reilly · 4.9 (35 reviews)

Easily define additional CSS (inline and/or by URL) to be added to all administration pages.

10K+ active installs Updated May 31, 2021 Tested to 5.7.12
Try Demo Download
Pre-installed Ready in ~10s No card

About Add Admin CSS

This plugin allows you to easily customize the appearance of your WordPress admin pages by adding CSS styles. You can add CSS inline or link to external CSS files, and the plugin also provides hooks for advanced users to customize the CSS further.

Screenshots

Add Admin CSS screenshot

Frequently asked questions

What does the Add Admin CSS plugin do?
The Add Admin CSS plugin allows users to define additional CSS to be added to all administration pages in WordPress. This enables customization of the appearance of the WordPress admin, such as hiding elements, changing fonts, or adjusting colors.
How can I add CSS using this plugin?
You can add CSS either inline within style tags or by referencing CSS files via URLs. The referenced CSS files appear first in the admin head, followed by any inline CSS.
Are there any advanced customization options?
Yes, the plugin exposes two filters, 'c2c_add_admin_css' and 'c2c_add_admin_c…', for advanced users to programmatically customize the CSS. These filters allow for further modification of the CSS added to the admin page head.

Changelog

2.0.1 (2021-05-30)

Highlights:

This recommended bugfix release addresses a potential conflict with other plugins that prevented the plugin settings page main content from being displayed.

Details:

  • Change: Update plugin framework to 063
    • Fix: Simplify settings initialization to prevent conflicts with other plugins
    • Change: Remove ability to detect plugin settings page before current screen is set, as it is no longer needed
    • Change: Enqueue thickbox during 'admin_enqueue_scripts' action instead of during 'init'
    • Change: Use is_plugin_admin_page() in help_tabs() instead of reproducing its functionality
    • Change: Trigger a debugging warning if is_plugin_admin_page() is used before 'admin_init' action is fired
  • New: Add new string (from plugin framework) for translation

2.0 (2021-05-12)

Highlights:

This recommended minor release updates the plugin framework, restructures unit test files, notes compatibility through 5.7+, and incorporates numerous minor behind-the-scenes tweaks.

Details:

  • Change: Outright support HTML5 rather than check for theme support of HTML5, since that isn’t relevant to admin
  • Change: Update plugin framework to 062
    • 062:
    • Change: Update is_plugin_admin_page() to use get_current_screen() when available
    • Change: Actually prevent object cloning and unserialization by throwing an error
    • Change: Check that there is a current screen before attempting to access its property
    • Change: Remove ‘type’ attribute from style tag
    • Change: Incorporate commonly defined styling for inline_textarea
    • 061:
    • Fix bug preventing settings from getting saved
    • 060:
    • Rename class from c2c_{PluginName}_Plugin_051 to c2c_Plugin_060
    • Move string translation handling into inheriting class making the plugin framework code plugin-agnostic
      • Add abstract function get_c2c_string() as a getter for translated strings
      • Replace all existing string usage with calls to get_c2c_string()
    • Handle WordPress’s deprecation of the use of the term “whitelist”
      • Change: Rename whitelist_options() to allowed_options()
      • Change: Use add_allowed_options() instead of deprecated add_option_whitelist() for WP 5.5+
      • Change: Hook allowed_options filter instead of deprecated whitelist_options for WP 5.5+
    • New: Add initial unit tests (currently just covering is_wp_version_cmp() and get_c2c_string())
    • Add is_wp_version_cmp() as a utility to compare current WP version against a given WP version
    • Refactor contextual_help() to be easier to read, and correct function docblocks
    • Don’t translate urlencoded donation email body text
    • Add inline comments for translators to clarify purpose of placeholders
    • Change PHP package name (make it singular)
    • Tweak inline function description
    • Note compatibility through WP 5.7+
    • Update copyright date (2021)
    • 051:
    • Allow setting integer input value to include commas
    • Use number_format_i18n() to format integer value within input field
    • Update link to coffee2code.com to be HTTPS
    • Update readme_url() to refer to plugin’s readme.txt on plugins.svn.wordpress.org
    • Remove defunct line of code
  • Change: Use plugin framework’s is_plugin_admin_page() instead of reinventing it
  • New: Add a recommendation for Add Admin JavaScript plugin to settings page
  • Change: Output the multiple tips on the settings page as a list instead of multiple paragraphs
  • Change: Prevent appending newline to value of setting passed to filter unless an actual value was configured
  • Change: Move translation of all parent class strings into main plugin file
  • Change: Tweak conditional checks to be more succinct
  • Change: Ensure there’s a current screen before attempting to get one of its properties
  • Change: Omit inline styles for settings now that plugin framework defines them
  • Change: Output newlines after paragraph tags in settings page
  • Change: Note compatibility through WP 5.7+
  • Change: Update copyright date (2021)
  • Change: Change plugin’s short description
  • Change: Tweak some readme.txt documentation
  • Change: Tweak some inline function and parameter documentation
  • Unit tests:
    • New: Add tests for JS files getting registered and enqueued
    • New: Add tests for add_codemirror()
    • New: Add help function get_css_files()
    • Change: Restructure unit test directories and files into tests/ top-level directory
    • Change: Remove ‘test-‘ prefix from unit test files
    • Change: In bootstrap, store path to plugin file constant so its value can be used within that file and in test file

1.9.1 (2020-09-25)

  • Change: Update plugin framework to 051
    • Allow setting integer input value to include commas
    • Use number_format_i18n() to format integer value within input field
    • Update link to coffee2code.com to be HTTPS
    • Update readme_url() to refer to plugin’s readme.txt on plugins.svn.wordpress.org
    • Remove defunct line of code
  • Change: Note compatibility through WP 5.5+
  • Change: Restructure unit test file structure
    • New: Create new subdirectory phpunit/ to house all files related to unit testing
    • Change: Move bin/ to phpunit/bin/
    • Change: Move tests/bootstrap.php to phpunit/
    • Change: Move tests/ to phpunit/tests/
    • Change: Rename phpunit.xml to phpunit.xml.dist per best practices

Full changelog is available in CHANGELOG.md.

Try other plugins

Yoast SEO icon

Yoast SEO

4.8 · 10M+ installs

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO…