fix: replace all inline style= attributes and <style> tags with CSS classes - #25
Open
datengraben wants to merge 3 commits into
Open
fix: replace all inline style= attributes and <style> tags with CSS classes#25datengraben wants to merge 3 commits into
datengraben wants to merge 3 commits into
Conversation
…lasses High-severity WordPress community standards violations: - Remove inline <style> block from Admin/Filter.php (CSP violation) - Replace hardcoded color style= attrs in Migration, TimeframeExport, MassOperations, Dashboard, Map, Booking views with semantic CSS classes (.cb-text-error, .cb-text-success, .cb-border-error, etc.) - Remove style= from all templates (dashboard-index, timeframe-calendar, timeframe-calendar-day, shortcode-bookings); use CSS classes instead - Add new utility/semantic classes to SCSS partials - Add LATER.md documenting deferred medium/low severity items SCSS compiles cleanly (validated with dart-sass). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KwwjrTFVrzzFUfDsC83zgV
getColorCSS() ran the full SCSS compiler on every public page load. Now the compiled CSS is stored in the cb_color_css transient (TTL: 1 year) and the transient is deleted in OptionsTab::savePostOptions() whenever the template colour settings are saved, triggering a single recompile on the next request. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KwwjrTFVrzzFUfDsC83zgV
Add commonsbooking_is_cb_page() helper that returns true when the current page is a CB custom post type (cb_item, cb_location, cb_booking) or its post content contains a CB shortcode. commonsbooking_public() now returns early when neither condition is met, so the main stylesheet, vendor bundle, Select2, Moment, datepicker, and AJAX nonces are skipped on unrelated pages. A commonsbooking_load_public_assets filter lets site owners opt in on pages where CB content is embedded outside the main post (widgets, page builders). AJAX endpoint registrations and query-var hooks are left ungated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KwwjrTFVrzzFUfDsC83zgV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High-severity WordPress community standards violations:
MassOperations, Dashboard, Map, Booking views with semantic CSS classes
(.cb-text-error, .cb-text-success, .cb-border-error, etc.)
timeframe-calendar-day, shortcode-bookings); use CSS classes instead
SCSS compiles cleanly (validated with dart-sass).
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KwwjrTFVrzzFUfDsC83zgV