Unhook javascript loading in posts
-
Hi, folks
thanks for all the updates to plugin; and thanks for helping me with the two prior ‘generations’ of the plugin to ‘unhook’ the javascript and CSS loading on page.In our case, we have custom CSS button with link to download PDF of each story on our news portal; however latest version you again changed the javascript file sources, so they are again loading in our header/footer when we don’t need them loading for every page, as we don’t use any of the JS for your built-in buttons on page.
An option to ‘not load css/js assets on page’ would be most welcome here.
We are currently doing this, by way of example, with your past assistance:
function my_theme_remove_assets_header() { wp_dequeue_style('pdfprnt_stylesheet'); } add_action( 'wp_print_styles', 'my_theme_remove_assets_header' );function dequeue_my_css() { wp_dequeue_style('pdfprnt_frontend'); wp_deregister_style('pdfprnt_frontend'); } add_action('wp_enqueue_scripts','dequeue_my_css',100);With latest version for PHP7; and updated PDF library; need a way to disable the javascript the plugin now loads in header/footer.
Thanks in advance.
The topic ‘Unhook javascript loading in posts’ is closed to new replies.