0

A WordPress plugin adds console output as follows, which I find penetrating and annoying:

add_action( 'wp_head', function() {
    echo "<script type='application/javascript'>console.log('123 Free version " . FREE_VERSION . "');</script>."
}, 1 );

How to remove this? wp_ob_end_flush_all does not seem to work for this under PHP 8 (is not called). How it can be filtered by regex I already know.

Mike
  • 161
  • 1
  • 12
  • @cabrerahector This solution works fine, I could only imagine that this way affects the loading time and there may be better solutions? – Mike Feb 27 '23 at 22:17
  • Couldn't say. Try and find out I guess, run performance tests and see what tye results are for your specific use case. – cabrerahector Feb 28 '23 at 01:47

0 Answers0