Commit 7e4917f
authored
fix(sso): add GlotPress compatibility for cross-domain SSO (#749)
GlotPress uses its own gp_head()/gp_footer() template actions instead of
WordPress's wp_head()/wp_footer(). The SSO script is hooked to wp_head, so
it never fires on GlotPress pages, preventing cross-domain login on
translation sites (e.g. translate.example.com).
Register the SSO enqueue_script callback on the gp_head action when
GlotPress is active (GP_VERSION defined). The check is deferred to
plugins_loaded since SSO startup() runs at sunrise before plugins load.1 parent 3b77af0 commit 7e4917f
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
276 | 292 | | |
277 | 293 | | |
278 | 294 | | |
| |||
0 commit comments