stephenharris / Event-Organiser

WordPress plug-in, Event Organiser, development repository
http://wordpress.org/extend/plugins/event-organiser/
GNU General Public License v3.0
100 stars 76 forks source link

Only load admin styles/scripts on Events post type #467

Open ingageco opened 5 years ago

ingageco commented 5 years ago

It would be cleaner if the admin styles included in this plugin were only loaded on the Events CPT where they are needed. Currently EO admin styles (specifically the JQuery UI css) are conflicting with meta boxes using CMB2(Pages).

With EO active:

Screen Shot 2019-09-17 at 11 54 37 PM

Without EO active:

Screen Shot 2019-09-17 at 11 57 54 PM
stephenharris commented 4 years ago

Hi @ingageco - I can't replicate the issue you have, and the plug-in should only loading on screens that need it. Specifically the jquery-ui styling is a dependency of eventorganiser-style which is only loaded on Event related pages (see for example: https://github.com/stephenharris/Event-Organiser/blob/develop/includes/event-organiser-register.php#L256)

Oddly, that screenshot looks similar to the help tab, and even when the styles are loaded, they don't impact it.

If you can point out how the styles are being loaded incorrectly, I'd be happy to fix it, but unfortunately I can't replicate the bug myself.

ingageco commented 4 years ago

No worries - i'll check it again and see if i can find another culprit - or a more specific example for you!