|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to CloudScale Code Block are documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). |
| 6 | + |
| 7 | +## [Unreleased] |
| 8 | + |
| 9 | +## [1.7.18] - 2026-03-13 |
| 10 | + |
| 11 | +### Security |
| 12 | +- Hardened `is_safe_query()`: SQL queries containing semicolons are now rejected, preventing statement stacking |
| 13 | +- Removed `$_REQUEST` fallback in SQL AJAX handler — only `$_POST` accepted |
| 14 | +- Added `phpcs:ignore` annotations with rationale for all intentional `$wpdb` direct-query patterns |
| 15 | + |
| 16 | +### Fixed |
| 17 | +- Removed echoed `<style>` block from admin tools page — all styles now served via enqueued `cs-admin-tabs.css` |
| 18 | +- Extracted inline `<script>` blocks from settings and SQL panels into enqueued JS files (`cs-admin-settings.js`, `cs-sql-editor.js`) |
| 19 | +- Replaced dynamic `document.head.appendChild(style)` injection in block editor with `wp_add_inline_style()` |
| 20 | +- Removed `console.warn()` and `console.log()` debug calls from `cs-convert.js` |
| 21 | + |
| 22 | +### Added |
| 23 | +- `uninstall.php` — removes `cs_code_default_theme` and `cs_code_theme_pair` options on plugin deletion |
| 24 | +- `load_plugin_textdomain()` called on `init`; 48 user-facing strings wrapped with i18n functions across frontend and admin |
| 25 | +- Full DocBlocks (`@since`, `@param`, `@return`) on all class methods and class definition |
| 26 | +- `@package` and `@since` tags in plugin file header |
| 27 | + |
| 28 | +### Changed |
| 29 | +- `wp_ajax_cs_save_theme_setting` hook consolidated into `init()` alongside all other AJAX hooks |
| 30 | +- `date()` replaced with `wp_date()` in migration scan to respect site timezone |
| 31 | +- `block.json` version synced to plugin version |
| 32 | + |
| 33 | +## [1.7.17] |
| 34 | + |
| 35 | +### Added |
| 36 | +- Copy button now shows a "Copy" label alongside the clipboard icon |
| 37 | + |
| 38 | +### Changed |
| 39 | +- CSS refactored for copy button styling |
| 40 | + |
| 41 | +## [1.7.16] |
| 42 | + |
| 43 | +### Fixed |
| 44 | +- `build_migrate_block()` JSON encoding corrected: removed `JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES` flags that caused `<`, `>`, and quote characters to be stored as literal bytes, corrupting block attributes on subsequent Gutenberg saves |
| 45 | + |
| 46 | +### Changed |
| 47 | +- All enqueued assets now use `filemtime()` for cache busting |
| 48 | +- Block editor toolbar improvements |
| 49 | + |
| 50 | +## [1.7.15] |
| 51 | + |
| 52 | +### Fixed |
| 53 | +- Split `decode_migrated_content()` into two independent passes so the bare-`\n` newline fix always runs regardless of whether unicode escapes were already decoded in the database |
| 54 | + |
| 55 | +## [1.7.14] |
| 56 | + |
| 57 | +### Fixed |
| 58 | +- `decode_migrated_content()` in `render_block()` decodes unicode escapes and bare newline separators left by the v1 migration bug, fixing display of affected code blocks without requiring database changes |
| 59 | + |
| 60 | +## [1.7.13] |
| 61 | + |
| 62 | +### Fixed |
| 63 | +- Code Block Migrator now uses safe JSON encoding so special characters like `<`, `>`, and quotes are stored as proper unicode escapes in block comment attributes, preventing content corruption on subsequent Gutenberg saves |
| 64 | + |
| 65 | +## [1.7.8] |
| 66 | + |
| 67 | +### Added |
| 68 | +- Copy, Paste, and Clear buttons to the block editor toolbar |
| 69 | + |
| 70 | +## [1.7.6] |
| 71 | + |
| 72 | +### Fixed |
| 73 | +- White toolbar text for improved contrast |
| 74 | +- UNDEFINED language badge no longer displayed |
| 75 | +- Powered by CloudScale link added to block toolbar |
| 76 | + |
| 77 | +## [1.7.3] |
| 78 | + |
| 79 | +### Changed |
| 80 | +- Admin CSS embedded inline for reliable rendering across all WordPress configurations |
| 81 | +- Admin UI restyled to match the CloudScale plugin family: navy gradient banner, dark tab bar with orange active indicator, white card panels with coloured gradient section headers |
| 82 | + |
| 83 | +## [1.7.0] |
| 84 | + |
| 85 | +### Added |
| 86 | +- 14 popular syntax colour themes: Atom One, GitHub, Monokai, Nord, Dracula, Tokyo Night, VS 2015/VS Code, Stack Overflow, Night Owl, Gruvbox, Solarized, Panda, Tomorrow Night, Shades of Purple |
| 87 | +- Colour Theme selector in the settings panel |
| 88 | +- HCL/Terraform and TOML to the language selector |
| 89 | +- 14 new SQL quick queries organised into four groups: Health and Diagnostics, Content Summary, Bloat and Cleanup Checks, URL and Migration Helpers |
| 90 | + |
| 91 | +### Changed |
| 92 | +- Each theme loads its dark and light variant from the highlight.js CDN |
| 93 | +- Toggle button switches between the dark and light variant of the chosen theme |
| 94 | +- Frontend CSS refactored to use CSS custom properties for theme-agnostic styling |
| 95 | +- Theme backgrounds and toolbar colours adapt automatically to the selected theme |
| 96 | +- Enter key now runs the SQL query; Shift+Enter inserts a newline |
| 97 | + |
| 98 | +## [1.6.0] |
| 99 | + |
| 100 | +### Added |
| 101 | +- Merged CloudScale SQL Command plugin into CloudScale Code Block |
| 102 | +- Combined Tools page at Tools > CloudScale Code and SQL with tabbed interface |
| 103 | +- AJAX save for theme settings (no page reload required) |
| 104 | + |
| 105 | +### Removed |
| 106 | +- Separate Settings > CloudScale Code Block page |
| 107 | +- Separate Tools > CloudScale SQL page |
| 108 | + |
| 109 | +## [1.5.0] |
| 110 | + |
| 111 | +### Added |
| 112 | +- Code Block Migrator tool to batch-convert legacy WordPress code blocks |
| 113 | +- Auto-convert toast in the block editor for `core/code` and `core/preformatted` blocks |
| 114 | +- Transform support from `core/code` and `core/preformatted` |
| 115 | + |
| 116 | +## [1.1.0] |
| 117 | + |
| 118 | +### Fixed |
| 119 | +- Block now spans full content width in both editor and frontend |
| 120 | +- Dark mode is now the proper default with Atom One Dark syntax colours |
| 121 | +- Code no longer wraps; horizontal scroll on overflow |
| 122 | +- Editor style properly registered via `block.json` `editorStyle` |
| 123 | + |
| 124 | +### Added |
| 125 | +- Alignment support (wide, full) in block toolbar |
| 126 | + |
| 127 | +## [1.0.0] |
| 128 | + |
| 129 | +### Added |
| 130 | +- Initial release: Gutenberg block and `[cs_code]` shortcode for syntax-highlighted code |
| 131 | +- Auto language detection for 30+ languages via highlight.js |
| 132 | +- One-click clipboard copy button |
| 133 | +- Dark/light mode toggle per block with site-wide default |
| 134 | +- Language badge auto-detection |
| 135 | +- Optional line numbers toggle |
| 136 | +- Custom title/filename label per block |
0 commit comments