Plugin Directory

Changeset 3391250


Ignore:
Timestamp:
11/06/2025 03:49:02 PM (4 months ago)
Author:
manovermachine
Message:

Version 1.2.8: Critical CSS leakage fix

CRITICAL FIXES:

  • Fixed CSS leakage affecting other WordPress plugins (SnappyWrite, WooCommerce, Yoast, etc.)
  • Added missing return statement in enqueue_admin_assets() that was loading CSS globally
  • Scoped all WordPress standard selectors to WeatherWrite pages only

CSS SCOPING:

  • Scoped .nav-tab-wrapper and .nav-tab styles to .toplevel_page_weatherwrite
  • Scoped .button.button-primary styles to .toplevel_page_weatherwrite
  • Scoped input[type=checkbox] and input[type=radio] styles to .toplevel_page_weatherwrite
  • CSS now loads exclusively on WeatherWrite admin pages

COMPATIBILITY:

  • Other plugins no longer affected by WeatherWrite styling
  • Eliminated missing logos, altered buttons, and modified tab navigation in other plugins
  • Plugin now follows WordPress best practices for admin CSS scoping

TECHNICAL:

  • Modified /includes/class-admin.php line 79 (added return statement)
  • Modified /assets/admin.css lines 47, 53, 59-61, 162-163, 208, 215, 260 (scoped selectors)

UX IMPACT:

  • WeatherWrite styling remains unchanged
  • Other plugins now display correctly with their intended styles
  • No more CSS conflicts across WordPress admin
Location:
weather-write/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • weather-write/trunk/assets/admin.css

    r3389240 r3391250  
    4545
    4646/* ---------- Tabs (sticky + animated underline) ---------- */
    47 .nav-tab-wrapper{
     47.toplevel_page_weatherwrite .nav-tab-wrapper{
    4848  position:sticky; top:32px; z-index:10;
    4949  margin-top:12px; padding:8px 8px 0; background:#fff;
     
    5151  box-shadow:0 1px 0 rgba(0,0,0,.03);
    5252}
    53 .nav-tab-wrapper .nav-tab{
     53.toplevel_page_weatherwrite .nav-tab-wrapper .nav-tab{
    5454  background:transparent; border:0; margin-right:6px;
    5555  color:var(--wwrt-muted); font-weight:700;
     
    5757  transition:color .15s ease;
    5858}
    59 .nav-tab-wrapper .nav-tab:hover{ color:var(--wwrt-primary-700); }
    60 .nav-tab-wrapper .nav-tab-active{ color:var(--wwrt-text); }
    61 .nav-tab-wrapper .nav-tab-active::after{
     59.toplevel_page_weatherwrite .nav-tab-wrapper .nav-tab:hover{ color:var(--wwrt-primary-700); }
     60.toplevel_page_weatherwrite .nav-tab-wrapper .nav-tab-active{ color:var(--wwrt-text); }
     61.toplevel_page_weatherwrite .nav-tab-wrapper .nav-tab-active::after{
    6262  content:""; position:absolute; left:10px; right:10px; bottom:-1px; height:3px;
    6363  background:var(--wwrt-primary); border-radius:2px;
     
    160160
    161161/* Checkboxes / radios */
    162 input[type="checkbox"], input[type="radio"]{ accent-color:var(--wwrt-primary); }
     162.toplevel_page_weatherwrite input[type="checkbox"],
     163.toplevel_page_weatherwrite input[type="radio"]{ accent-color:var(--wwrt-primary); }
    163164
    164165/* Day chips */
     
    205206.wwrt-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:12px; }
    206207.wwrt-actions .button-primary,
    207 .button.button-primary{
     208.toplevel_page_weatherwrite .button.button-primary{
    208209  background:var(--wwrt-primary); border-color:var(--wwrt-primary); color:#fff;
    209210  border-radius:999px; padding:9px 18px; font-weight:700;
     
    212213}
    213214.wwrt-actions .button-primary:hover,
    214 .button.button-primary:hover{
     215.toplevel_page_weatherwrite .button.button-primary:hover{
    215216  background:var(--wwrt-primary-600); border-color:var(--wwrt-primary-600);
    216217  transform:translateY(-1px);
     
    257258/* Removed broad indent to avoid excessive right-side spacing; consider per-group wrappers if deeper hierarchy is desired */
    258259.wwrt-actions .button-primary:focus,
    259 .button.button-primary:focus{ box-shadow:var(--wwrt-focus); }
     260.toplevel_page_weatherwrite .button.button-primary:focus{ box-shadow:var(--wwrt-focus); }
    260261.wwrt-wrap .wp-core-ui .button,
    261262.wwrt-wrap .wp-core-ui .button-secondary{ border-radius:10px; }
  • weather-write/trunk/includes/class-admin.php

    r3389248 r3391250  
    7777        // Only load on our WeatherWrite top-level page
    7878        if ( 'toplevel_page_weatherwrite' !== $hook ) {
    79             // Header content added above
     79            return; // Don't load CSS/JS on other admin pages
    8080        }
    8181        // Ensure media library is available for Images tab
  • weather-write/trunk/readme.txt

    r3391231 r3391250  
    44Requires at least: 6.5
    55Tested up to: 6.8
    6 Stable tag: 1.2.7
     6Stable tag: 1.2.8
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8787
    8888== Changelog ==
     89
     90= 1.2.8 =
     91- CRITICAL FIX: Resolved CSS leakage affecting other WordPress plugins
     92- CRITICAL FIX: Added missing return statement in enqueue_admin_assets() preventing CSS from loading globally
     93- IMPROVEMENT: Scoped all nav-tab-wrapper styles to WeatherWrite pages only
     94- IMPROVEMENT: Scoped all button.button-primary styles to WeatherWrite pages only
     95- IMPROVEMENT: Scoped all checkbox/radio input styles to WeatherWrite pages only
     96- TECHNICAL: Added .toplevel_page_weatherwrite prefix to all global WordPress selectors
     97- TECHNICAL: CSS now loads exclusively on WeatherWrite admin pages, not across all of WordPress
     98- UX: Other plugins (SnappyWrite, WooCommerce, Yoast, etc.) no longer affected by WeatherWrite styling
     99- UX: Eliminated missing logos, altered buttons, and modified tab navigation in other plugins
     100- COMPATIBILITY: Plugin now follows WordPress best practices for admin CSS scoping
    89101
    90102= 1.2.7 =
  • weather-write/trunk/weather-write.php

    r3391231 r3391250  
    33 * Plugin Name: Weather Write
    44 * Description: Generate and publish weather-aware posts with summaries, charts, images, alerts, SEO, and more — fully automated or on-demand.
    5  * Version: 1.2.7
     5 * Version: 1.2.8
    66 * Author: Mike Freeman - WeatherWrite
    77 * Plugin URI: https://www.weatherwrite.com/
Note: See TracChangeset for help on using the changeset viewer.