• Hi,

    On my theme I want to remove the plugin style, so I deregistered the styles contact-form-7 and contact-form-7-rtl but query monitor tell me that there is a:

    Missing contact-form-7

    So, looking into the plugin there is no a wp_register_style call.
    Do you think will be better to use wp_dequeue_style or ( I hope so ) register the contact-form-7 style first and before the enqueue check if the style is registered or not?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter Guido Scialfa

    (@wido)

    Hi @takayukister,

    Thank you for your reply, I understand your solution to the problem.

    Thanks to your article I know that I can add filters to prevent the scripts and styles to load, but, why since WordPress way is to register and than enqueue script this plugin doesn’t follow that practice?

    Instead of adding a filter would not more efficient to register than test if it is registered and in case enqueue the script/style?

    In this way I can simply deregister the scripts also, I can check if the script/style is registered instead of check if the functions ‘wpcf7_enqueue_scripts’, and ‘wpcf7_enqueue_styles’ exists.

    That’s my opinion nothing else.

    Thank you

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Of course you can also wp_dequeue_style them if you wish since it follows the WordPress practice.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deregister Style and Enqueue’ is closed to new replies.