• So right now works only on frontend requests that if you are behind a cache system the filter wp_head is not executed.

    It is better to use the plugins_loaded that is executed in any solution including wp-cli, that is executed when all the plugins are loaded.
    In this way also behind a cache system it is executed.

    Also it is always better to remove the final ?> with the empty line after to not break the html page output in a php file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Daniele Scasciafratte

    (@mte90)

    Also I added a check if is_admin() so in the wp backend is executed at any page.
    To be executed also on wp-cli require the initial if to be changed a bit anyway.

    Plugin Author Jennifer Moss

    (@mossifer)

    Thanks for the input!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Switch wp_dead to plugins_loaded’ is closed to new replies.