Support » Plugin: PIKLIST - Easily Build Fields, Forms, Settings, Widgets and More. » piklist changes the menu text color of BPS plugin fyi

  • Resolved jhnpldng

    (@jhnpldng)


    I have Bullet Proof Security and Piklist installed on a multisite network and the piklist plugin changes the text color of the BPS menu from white to medium gray and this is on a medium blue background so I didn’t even notice the BPS menu when first using it. Not sure how or why piklist is overriding the styling of another plugin. I haven’t actually used piklist at all yet. There’s an open thread on the BPS plugin board. I complained about the gray on blue menu and was informed that it’s suposed to be white on blue.

    https://wordpress.org/plugins/piklist/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Contributor Piklist

    (@piklist)

    Thanks for letting us know. We will take a look and let you know what we find.

    Thread Starter jhnpldng

    (@jhnpldng)

    No problem and I can’t wait to try piklist. Watching the wordcamp video right now. I’ll put piklist on a local install which is probably more suitable anyway.

    Just making this change to the code will fix the problem. BPS already has a dequeue function that will dequeue other plugin scripts from loading on BPS plugin pages, but it only works if the WP enqueue method is correct and no boo boos in the code. 😉

    wp_register_style('jquery-ui-core', piklist::$urls['piklist'] . '/parts/css/jquery-ui/jquery-ui.piklist.css', false, $jquery_ui_core->ver);
    
    wp_enqueue_style('jquery-ui-core');

    Code should be changed to something like this with a unique script identifier for your style.

    wp_register_style('piklist-css', piklist::$urls['piklist'] . '/parts/css/jquery-ui/jquery-ui.piklist.css', false, $jquery_ui_core->ver);
    
    wp_enqueue_style('piklist-css', piklist::$urls['piklist'] . '/parts/css/jquery-ui/jquery-ui.piklist.css'));

    But of course that will probably not solve the problem for other plugins that do not have a dequeue scripts function. 😉 So wrapping the css script loading code in a conditional wrap would be a better solution for the backend. The frontend is totally different animal. 😉

    if ( preg_match( '/page=plugin-folder-name/', esc_html($_SERVER['REQUEST_URI']), $matches ) ) {
    // your script loading code here
    }
    Plugin Author Steve Bruner

    (@sbruner)

    @aitpro– I’m one of the developers of Piklist.

    Piklist is a framework that can be used on ANY page in the WordPress admin, including your settings pages. So limiting our css to a particular url won’t work.

    I see you are targeting #bps-container in some of your custom css. Why don’t you prepend all of it? This way it is protected from any plugins that use jQuery UI CSS.

    No problem we have a working solution created already that filters out all Piklist scripts from loading on BPS plugin pages/BPS plugin Source Code. Previously we already had a function that dequeued other plugins scripts from loading in BPS Plugin pages Source Code, but it relies on the $handle being queued in a way that we can dequeue it. Important Note: this is only done on BPS plugin pages and nowhere else. 1 of your scripts was being dequeued successfully on BPS plugin pages/BPS Source Code, but not the other 1. So we are using another filter that takes care of nulling that other Piklist script from loading in BPS plugin pages Source Code.

    I see you are targeting #bps-container in some of your custom css. Why don’t you prepend all of it? This way it is protected from any plugins that use jQuery UI CSS.

    Logically you would think that that would work, but it doesn’t. 😉 In any case, it is much better just to not have any other plugin or theme scripts loading in BPS Source Code/plugin pages at all. Thanks.

    Also just a general FYI. It is customary to make everything optional in WordPress with plugins and themes to allow users to choose what they do and do not want. WordPress page formatting is being changed on all WordPress Core pages by your CSS so that could come back to haunt you. Example: on the WordPress Plugins page the font sizes are changed and bolded. A user at some point will probably ask you why you are doing that. 😉 Trust me, that is going to happen at some point and is just a matter of time until a user asks you that. 😉 The Piklist footer link on WordPress Core pages should definitely be optional. 😉

    Correction: maybe the font sizes are not being changed on WP Core pages. It is probably just that the font is bolded that makes the font look “bigger”. 😉

    One last thing. Any info I have posted above is for your benefit and I am not trying to make you guys wrong about anything you are doing. ie down the road when an irrate user decides to give you a 1 star rating because something you are doing pisses that user off. Speaking from lots of personal experience it can be the smallest, most insignificant thing that gets you a 1 star rating. 😉

    Plugin Author Steve Bruner

    (@sbruner)

    @aitpro

    Piklist is a “Framework”, which means the user can easily manipulate every page in the WordPress admin. Trying to remove our css is only hurting the user.

    If you namespace your custom css, this would solve all problems.

    Ok I tried. Good luck with your plugin.

    Plugin Author Steve Bruner

    (@sbruner)

    @jhnpldng– Piklist is not just suitable for a local install. Piklist helps you build amazing things with WordPress… on production environments as well. 🙂

    @steve Bruner – You should probably also let the WordPress folks know that they need to change the WordPress Core code to accommodate your plugin since your plugin is changing things visually in all WordPress Core pages.

    Plugin Author Steve Bruner

    (@sbruner)

    @aitpro– Hooks and filters are on every admin page just for that very reason… so the admin can be customized.

    Marking this ticket as resolved.

    Thanks for your help!

    Oh ok then you should offer users a choice before just making changes to things. That is customary anyway. The issue with your plugin script breaking my plugin’s css and 1 other plugin that I am aware of is a different issue entirely. I will reach out to the other plugin author that is being negatively impacted by your plugin and share the code to null your plugin’s scripts. Thanks.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘piklist changes the menu text color of BPS plugin fyi’ is closed to new replies.