Support » Plugin: Smartsupp Live Chat » Stop overwriting styles on backend

  • Since the latest update the admin section of WP looks weird.
    I found that this plugin is causing these changes in the bootstrap CSS file.

    Your CSS files should only be loaded on this plugin’s setting pages, not on every admin page.
    I’d also wouldn’t change the default WP admin styles.

    Please fix this a.s.a.p.

Viewing 3 replies - 1 through 3 (of 3 total)
  • In addition to this.

    You are loading the admin styles wrong. This should be done with the admin_enqueue_scripts action according to WP standards.

    Plugin Author marekgach

    (@marekgach)

    Hello Jory,
    this was the major bug we had in our previous version. This was fixed in version 3.1. Thanks for advice but admin_enqueue_scripts function cannot be used here because we divide admin into 2 parts – settings and admin page. This is because we have some same layout and code for almost all of our plugins.

    Hi @marekgach,

    Sorry, forgot to revisit post, I see it was indeed fixed in the latest release.

    Still don’t get why admin_enqueue_scripts can’t be used since it provides a current screen variable ($hook_suffix).
    https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/

    With that variable you can check the current page slug before adding any scripts/styles.

    But because this is a side-topic for this issue, I’ll mark this one as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Stop overwriting styles on backend’ is closed to new replies.