Commit a15bf2d
Add Branding::enqueue_inline_css() so partner CSS can attach to any handle (#762)
Allows external integrations (e.g. pp-hosts guided tour, which runs on
the block editor, site editor, frontend, and non-PP admin screens) to
apply the partner branding custom CSS to their own stylesheets, instead
of being limited to the PP admin pages where Page::enqueue_styles()
runs.
The new method is idempotent per style handle, so the per-request
dedupe that previously lived on Page (via the
$branding_inline_styles_added static — needed because dashboard
widgets call enqueue_styles() multiple times per request) now lives
with the branding class itself and works for any handle.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ded2039 commit a15bf2d
2 files changed
Lines changed: 32 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 15 | | |
23 | 16 | | |
24 | 17 | | |
| |||
285 | 278 | | |
286 | 279 | | |
287 | 280 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 281 | + | |
292 | 282 | | |
293 | 283 | | |
294 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| |||
124 | 131 | | |
125 | 132 | | |
126 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
127 | 158 | | |
128 | 159 | | |
129 | 160 | | |
| |||
0 commit comments