Coder Social home page Coder Social logo

javascript cookie notice about awps HOT 7 CLOSED

alecaddd avatar alecaddd commented on August 19, 2024
javascript cookie notice

from awps.

Comments (7)

bartoszarendt avatar bartoszarendt commented on August 19, 2024

most probably your site is missing the wp_footer() function and you don't have js included

from awps.

andreapaiola avatar andreapaiola commented on August 19, 2024

most probably your site is missing the wp_footer() function and you don't have js included

thank you, but nope

schermata 2018-09-25 alle 11 44 02

schermata 2018-09-25 alle 11 45 09

from awps.

bartoszarendt avatar bartoszarendt commented on August 19, 2024

please share a link to your site first

from awps.

andreapaiola avatar andreapaiola commented on August 19, 2024

please share a link to your site first

sorry, I can't because it's not public

from awps.

andreapaiola avatar andreapaiola commented on August 19, 2024

ok, it loads if I comment

wp_deregister_script( 'jquery' );

in the theme

https://github.com/Alecaddd/awps/blob/master/inc/Setup/Enqueue.php

jQuery is a dependency, of course

from awps.

chesio avatar chesio commented on August 19, 2024

jQuery is a dependency, of course

WordPress does not output a script, if any of its dependencies is unknown (= not registered), as you just have learned. So why do you deregister jQuery at all? A lot of plugins has scripts that depend on jQuery.

from awps.

Alecaddd avatar Alecaddd commented on August 19, 2024

I use wp_deregister_script( 'jquery' ); because WordPress comes with an outdated version and it's always enqueued in the Header and not in the Footer.

I bundle jQuery inside the webpack.mix.js file on line 29.

Some plugins have the enqueue option with a dependency listed as the third parameter.
Usually is something like this array('jquery'), to let WordPress know that script requires jQuery in order to work.
More info here: https://developer.wordpress.org/reference/functions/wp_enqueue_script/

If you remove the wp_deregister_script( 'jquery' ); from the Enqueue.php file, be sure to comment out the mix autoload to avoid bundling jquery in the compiled assets.

from awps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.