why you need to load JS if you disable the order option

WPPizza – A Restaurant Plugin for WordPress Support General Support why you need to load JS if you disable the order option

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5988
    foxpc
    Participant

      Hi,
      i notice that wppizza plugin load some JS code and 2 files.
      the question is why to load all this JS, if the menu working as static menu without the order option.
      so why you need to load this JS?

      <script type='text/javascript'>
      /* <![CDATA[ */
      var wppizza = {"ajaxurl":"http:\/\/mywebsite.com\/wp-admin\/admin-ajax.php","validate_error":{"email":"invalid email address","required":"\u05e9\u05d3\u05d4 \u05d7\u05d5\u05d1\u05d4","decimal":"\u05de\u05e1\u05e4\u05e8\u05d9\u05dd \u05e2\u05e9\u05e8\u05d5\u05e0\u05d9\u05d9\u05dd \u05d1\u05dc\u05d1\u05d3 \u05d1\u05d1\u05e7\u05e9\u05d4"},"msg":{"closed":"\u05de\u05e6\u05d8\u05e2\u05e8\u05d9\u05dd, \u05d0\u05e0\u05d7\u05e0\u05d5 \u05db\u05e8\u05d2\u05e2 \u05e1\u05d2\u05d5\u05e8\u05d9\u05dd"},"funcCartRefr":["wppizzaShortcodeTotals"],"extend":[],"crt":{"anim":450,"fx":"","mt":20,"bg":"inherit"}};
      /* ]]> */
      </script>

      and this two files

      <script type='text/javascript' src='/plugins/wppizza/js/scripts.min.js'></script>
      <script type='text/javascript' src='/plugins/wppizza/js/jquery.validate.min.js'></script>
      #6012
      Olly
      Admin & Mod

        because other plugins/customisations might depend on it

        in any case, loading about an extra 35kb is neither here nor there in most WP scenarios (after all, jquery itself is about 100kb at a minimum,)

        generally speaking though, i’m all for keeping loading of unnecessary external files to a minimum if at all possible

        #6013
        Olly
        Admin & Mod

          then again, if you are certain you do not need any of this, you can always dequeue scripts

          #6019
          foxpc
          Participant

            Hi Olly,
            i tried to dequeue this scripts but without luck.
            can you help me with this?

            Thanks

            #6022
            Olly
            Admin & Mod
            Viewing 5 posts - 1 through 5 (of 5 total)
            • The topic ‘why you need to load JS if you disable the order option’ is closed to new replies.