Changeset 3414766
- Timestamp:
- 12/08/2025 10:40:07 PM (4 months ago)
- Location:
- add-admin-css
- Files:
-
- 6 edited
- 1 copied
-
tags/2.5.1 (copied) (copied from add-admin-css/trunk)
-
tags/2.5.1/CHANGELOG.md (modified) (1 diff)
-
tags/2.5.1/add-admin-css.php (modified) (5 diffs)
-
tags/2.5.1/readme.txt (modified) (3 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/add-admin-css.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
add-admin-css/tags/2.5.1/CHANGELOG.md
r3284556 r3414766 1 1 # Changelog 2 3 ## 2.5.1 _(2025-12-02)_ 4 5 ### Highlights: 6 7 A bugfix release to address the overzealous encoding of some valid CSS characters introduced in v2.5. 8 9 ### Details: 10 11 * Fix: Escape only the minimum of characters so that valid CSS characters don't get escaped. Props kevinvanrijn. 12 * New: Add `.gitattributes` file to exclude files from Github packaging. Props kevinvanrijn. 13 * Change: Note compatibility through WP 6.9+ 2 14 3 15 ## 2.5 _(2025-03-29)_ -
add-admin-css/tags/2.5.1/add-admin-css.php
r3284556 r3414766 2 2 /** 3 3 * Plugin Name: Add Admin CSS 4 * Version: 2.5 4 * Version: 2.5.1 5 5 * Plugin URI: https://coffee2code.com/wp-plugins/add-admin-css/ 6 6 * Author: Scott Reilly … … 11 11 * Description: Easily define additional CSS (inline and/or by URL) to be added to all administration pages. 12 12 * 13 * Compatible with WordPress 5.5+ through 6. 8+, and PHP through at least 8.3+.13 * Compatible with WordPress 5.5+ through 6.9+, and PHP through at least 8.3+. 14 14 * 15 15 * =>> Read the accompanying readme.txt file for instructions and documentation. … … 19 19 * @package Add_Admin_CSS 20 20 * @author Scott Reilly 21 * @version 2.5 21 * @version 2.5.1 22 22 **/ 23 23 … … 104 104 */ 105 105 protected function __construct() { 106 parent::__construct( '2.5 ', 'add-admin-css', 'c2c', __FILE__, array( 'settings_page' => 'themes' ) );106 parent::__construct( '2.5.1', 'add-admin-css', 'c2c', __FILE__, array( 'settings_page' => 'themes' ) ); 107 107 register_activation_hook( __FILE__, array( __CLASS__, 'activation' ) ); 108 108 … … 619 619 * @since 1.0 620 620 * 621 * @param string $files CSS code(without `<style>` tag).621 * @param string $files CSS styles (without `<style>` tag). 622 622 */ 623 623 $css = trim( apply_filters( 'c2c_add_admin_css', $css ) ); 624 624 625 if ( $css ) { 625 if ( $css && is_string( $css ) ) { 626 // Encode '<' to prevent tag injection. 627 $sanitized_css = str_replace( '<', '<', wp_check_invalid_utf8( $css ) ); 628 // Allow use of '<' in comparators. 629 $sanitized_css = str_replace( '< ', '< ', $sanitized_css ); 630 $sanitized_css = str_replace( '<= ', '<= ', $sanitized_css ); 631 626 632 echo "<style>\n"; 627 echo esc_html( $css ) . "\n"; 633 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Sanitized above. 634 echo $sanitized_css . "\n"; 628 635 echo "</style>\n"; 629 636 } -
add-admin-css/tags/2.5.1/readme.txt
r3284556 r3414766 6 6 License URI: https://www.gnu.org/licenses/gpl-2.0.html 7 7 Requires at least: 5.5 8 Tested up to: 6. 89 Stable tag: 2.5 8 Tested up to: 6.9 9 Stable tag: 2.5.1 10 10 11 11 Easily define additional CSS (inline and/or by URL) to be added to all administration pages. … … 94 94 95 95 == Changelog == 96 97 = 2.5.1 (2025-12-02) = 98 Highlights: 99 100 A bugfix release to address the overzealous encoding of some valid CSS characters introduced in v2.5. 101 102 Details: 103 104 * Fix: Escape only the minimum of characters so that valid CSS characters don't get escaped. Props kevinvanrijn. 105 * Change: Note compatibility through WP 6.9+ 96 106 97 107 = 2.5 (2025-03-29) = … … 186 196 * New: Add new string (from plugin framework) for translation 187 197 188 = 2.0 (2021-05-12) =189 190 Highlights:191 192 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.193 194 Details:195 196 * Change: Outright support HTML5 rather than check for theme support of HTML5, since that isn't relevant to admin197 * Change: Update plugin framework to 062198 * 062:199 * Change: Update `is_plugin_admin_page()` to use `get_current_screen()` when available200 * Change: Actually prevent object cloning and unserialization by throwing an error201 * Change: Check that there is a current screen before attempting to access its property202 * Change: Remove 'type' attribute from `style` tag203 * Change: Incorporate commonly defined styling for inline_textarea204 * 061:205 * Fix bug preventing settings from getting saved206 * 060:207 * Rename class from `c2c_{PluginName}_Plugin_051` to `c2c_Plugin_060`208 * Move string translation handling into inheriting class making the plugin framework code plugin-agnostic209 * Add abstract function `get_c2c_string()` as a getter for translated strings210 * Replace all existing string usage with calls to `get_c2c_string()`211 * Handle WordPress's deprecation of the use of the term "whitelist"212 * Change: Rename `whitelist_options()` to `allowed_options()`213 * Change: Use `add_allowed_options()` instead of deprecated `add_option_whitelist()` for WP 5.5+214 * Change: Hook `allowed_options` filter instead of deprecated `whitelist_options` for WP 5.5+215 * New: Add initial unit tests (currently just covering `is_wp_version_cmp()` and `get_c2c_string()`)216 * Add `is_wp_version_cmp()` as a utility to compare current WP version against a given WP version217 * Refactor `contextual_help()` to be easier to read, and correct function docblocks218 * Don't translate urlencoded donation email body text219 * Add inline comments for translators to clarify purpose of placeholders220 * Change PHP package name (make it singular)221 * Tweak inline function description222 * Note compatibility through WP 5.7+223 * Update copyright date (2021)224 * 051:225 * Allow setting integer input value to include commas226 * Use `number_format_i18n()` to format integer value within input field227 * Update link to coffee2code.com to be HTTPS228 * Update `readme_url()` to refer to plugin's readme.txt on plugins.svn.wordpress.org229 * Remove defunct line of code230 * Change: Use plugin framework's `is_plugin_admin_page()` instead of reinventing it231 * New: Add a recommendation for Add Admin JavaScript plugin to settings page232 * Change: Output the multiple tips on the settings page as a list instead of multiple paragraphs233 * Change: Prevent appending newline to value of setting passed to filter unless an actual value was configured234 * Change: Move translation of all parent class strings into main plugin file235 * Change: Tweak conditional checks to be more succinct236 * Change: Ensure there's a current screen before attempting to get one of its properties237 * Change: Omit inline styles for settings now that plugin framework defines them238 * Change: Output newlines after paragraph tags in settings page239 * Change: Note compatibility through WP 5.7+240 * Change: Update copyright date (2021)241 * Change: Change plugin's short description242 * Change: Tweak some readme.txt documentation243 * Change: Tweak some inline function and parameter documentation244 * Unit tests:245 * New: Add tests for JS files getting registered and enqueued246 * New: Add tests for `add_codemirror()`247 * New: Add help function `get_css_files()`248 * Change: Restructure unit test directories and files into `tests/` top-level directory249 * Change: Remove 'test-' prefix from unit test files250 * Change: In bootstrap, store path to plugin file constant so its value can be used within that file and in test file251 252 198 _Full changelog is available in [CHANGELOG.md](https://github.com/coffee2code/add-admin-css/blob/master/CHANGELOG.md)._ 253 199 254 200 255 201 == Upgrade Notice == 202 203 = 2.5.1 = 204 Recommended bugfix update: Addressed the overzealous encoding of some valid CSS characters introduced in v2.5 and noted compatibility through WP 6.9+. 256 205 257 206 = 2.5 = -
add-admin-css/trunk/CHANGELOG.md
r3284556 r3414766 1 1 # Changelog 2 3 ## 2.5.1 _(2025-12-02)_ 4 5 ### Highlights: 6 7 A bugfix release to address the overzealous encoding of some valid CSS characters introduced in v2.5. 8 9 ### Details: 10 11 * Fix: Escape only the minimum of characters so that valid CSS characters don't get escaped. Props kevinvanrijn. 12 * New: Add `.gitattributes` file to exclude files from Github packaging. Props kevinvanrijn. 13 * Change: Note compatibility through WP 6.9+ 2 14 3 15 ## 2.5 _(2025-03-29)_ -
add-admin-css/trunk/add-admin-css.php
r3284556 r3414766 2 2 /** 3 3 * Plugin Name: Add Admin CSS 4 * Version: 2.5 4 * Version: 2.5.1 5 5 * Plugin URI: https://coffee2code.com/wp-plugins/add-admin-css/ 6 6 * Author: Scott Reilly … … 11 11 * Description: Easily define additional CSS (inline and/or by URL) to be added to all administration pages. 12 12 * 13 * Compatible with WordPress 5.5+ through 6. 8+, and PHP through at least 8.3+.13 * Compatible with WordPress 5.5+ through 6.9+, and PHP through at least 8.3+. 14 14 * 15 15 * =>> Read the accompanying readme.txt file for instructions and documentation. … … 19 19 * @package Add_Admin_CSS 20 20 * @author Scott Reilly 21 * @version 2.5 21 * @version 2.5.1 22 22 **/ 23 23 … … 104 104 */ 105 105 protected function __construct() { 106 parent::__construct( '2.5 ', 'add-admin-css', 'c2c', __FILE__, array( 'settings_page' => 'themes' ) );106 parent::__construct( '2.5.1', 'add-admin-css', 'c2c', __FILE__, array( 'settings_page' => 'themes' ) ); 107 107 register_activation_hook( __FILE__, array( __CLASS__, 'activation' ) ); 108 108 … … 619 619 * @since 1.0 620 620 * 621 * @param string $files CSS code(without `<style>` tag).621 * @param string $files CSS styles (without `<style>` tag). 622 622 */ 623 623 $css = trim( apply_filters( 'c2c_add_admin_css', $css ) ); 624 624 625 if ( $css ) { 625 if ( $css && is_string( $css ) ) { 626 // Encode '<' to prevent tag injection. 627 $sanitized_css = str_replace( '<', '<', wp_check_invalid_utf8( $css ) ); 628 // Allow use of '<' in comparators. 629 $sanitized_css = str_replace( '< ', '< ', $sanitized_css ); 630 $sanitized_css = str_replace( '<= ', '<= ', $sanitized_css ); 631 626 632 echo "<style>\n"; 627 echo esc_html( $css ) . "\n"; 633 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Sanitized above. 634 echo $sanitized_css . "\n"; 628 635 echo "</style>\n"; 629 636 } -
add-admin-css/trunk/readme.txt
r3284556 r3414766 6 6 License URI: https://www.gnu.org/licenses/gpl-2.0.html 7 7 Requires at least: 5.5 8 Tested up to: 6. 89 Stable tag: 2.5 8 Tested up to: 6.9 9 Stable tag: 2.5.1 10 10 11 11 Easily define additional CSS (inline and/or by URL) to be added to all administration pages. … … 94 94 95 95 == Changelog == 96 97 = 2.5.1 (2025-12-02) = 98 Highlights: 99 100 A bugfix release to address the overzealous encoding of some valid CSS characters introduced in v2.5. 101 102 Details: 103 104 * Fix: Escape only the minimum of characters so that valid CSS characters don't get escaped. Props kevinvanrijn. 105 * Change: Note compatibility through WP 6.9+ 96 106 97 107 = 2.5 (2025-03-29) = … … 186 196 * New: Add new string (from plugin framework) for translation 187 197 188 = 2.0 (2021-05-12) =189 190 Highlights:191 192 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.193 194 Details:195 196 * Change: Outright support HTML5 rather than check for theme support of HTML5, since that isn't relevant to admin197 * Change: Update plugin framework to 062198 * 062:199 * Change: Update `is_plugin_admin_page()` to use `get_current_screen()` when available200 * Change: Actually prevent object cloning and unserialization by throwing an error201 * Change: Check that there is a current screen before attempting to access its property202 * Change: Remove 'type' attribute from `style` tag203 * Change: Incorporate commonly defined styling for inline_textarea204 * 061:205 * Fix bug preventing settings from getting saved206 * 060:207 * Rename class from `c2c_{PluginName}_Plugin_051` to `c2c_Plugin_060`208 * Move string translation handling into inheriting class making the plugin framework code plugin-agnostic209 * Add abstract function `get_c2c_string()` as a getter for translated strings210 * Replace all existing string usage with calls to `get_c2c_string()`211 * Handle WordPress's deprecation of the use of the term "whitelist"212 * Change: Rename `whitelist_options()` to `allowed_options()`213 * Change: Use `add_allowed_options()` instead of deprecated `add_option_whitelist()` for WP 5.5+214 * Change: Hook `allowed_options` filter instead of deprecated `whitelist_options` for WP 5.5+215 * New: Add initial unit tests (currently just covering `is_wp_version_cmp()` and `get_c2c_string()`)216 * Add `is_wp_version_cmp()` as a utility to compare current WP version against a given WP version217 * Refactor `contextual_help()` to be easier to read, and correct function docblocks218 * Don't translate urlencoded donation email body text219 * Add inline comments for translators to clarify purpose of placeholders220 * Change PHP package name (make it singular)221 * Tweak inline function description222 * Note compatibility through WP 5.7+223 * Update copyright date (2021)224 * 051:225 * Allow setting integer input value to include commas226 * Use `number_format_i18n()` to format integer value within input field227 * Update link to coffee2code.com to be HTTPS228 * Update `readme_url()` to refer to plugin's readme.txt on plugins.svn.wordpress.org229 * Remove defunct line of code230 * Change: Use plugin framework's `is_plugin_admin_page()` instead of reinventing it231 * New: Add a recommendation for Add Admin JavaScript plugin to settings page232 * Change: Output the multiple tips on the settings page as a list instead of multiple paragraphs233 * Change: Prevent appending newline to value of setting passed to filter unless an actual value was configured234 * Change: Move translation of all parent class strings into main plugin file235 * Change: Tweak conditional checks to be more succinct236 * Change: Ensure there's a current screen before attempting to get one of its properties237 * Change: Omit inline styles for settings now that plugin framework defines them238 * Change: Output newlines after paragraph tags in settings page239 * Change: Note compatibility through WP 5.7+240 * Change: Update copyright date (2021)241 * Change: Change plugin's short description242 * Change: Tweak some readme.txt documentation243 * Change: Tweak some inline function and parameter documentation244 * Unit tests:245 * New: Add tests for JS files getting registered and enqueued246 * New: Add tests for `add_codemirror()`247 * New: Add help function `get_css_files()`248 * Change: Restructure unit test directories and files into `tests/` top-level directory249 * Change: Remove 'test-' prefix from unit test files250 * Change: In bootstrap, store path to plugin file constant so its value can be used within that file and in test file251 252 198 _Full changelog is available in [CHANGELOG.md](https://github.com/coffee2code/add-admin-css/blob/master/CHANGELOG.md)._ 253 199 254 200 255 201 == Upgrade Notice == 202 203 = 2.5.1 = 204 Recommended bugfix update: Addressed the overzealous encoding of some valid CSS characters introduced in v2.5 and noted compatibility through WP 6.9+. 256 205 257 206 = 2.5 =
Note: See TracChangeset
for help on using the changeset viewer.