I'm creating a custom theme and using one of video embedding plugins from the market. There are plenty of options and among them "don't load css style", is there a way how to make it always checked when my theme is active? Author hasn't provided any define value to fix it.

it's stored in option: fve_disable_css

I have tried to update_option(); on init and as well tried a filter pre_option_fve_disable_css but no success, any ideas?

Thanks a lot

  • do you have the part of the plugin where the function is attached to an action? you have to attach your update_option to the same action but lower priority so it overrides the plugin one.
    – David Lee
    Commented Sep 24, 2017 at 17:12

1 Answer 1


Plugin can read options on init event or just in code (during loading). All plugins are loaded before theme load. So, using init action can be too late.

Filter pre_option_fve_disable_css doesn't change value of the option. Instead, you have to use option_fve_disable_css filter. But again, it can be also too late.

You should check the handle name in wp_enqueue_script function in plugin code, which enqueues relevant css and deregister this handle in your functions.php during wp_enqueue_script event. This is the right time for such an action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.