WPPizza – A Restaurant Plugin for WordPress › Support › General Support › why you need to load JS if you disable the order option
- AuthorPosts
- 4 November, 2014 at 8:56 am #5988
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>
6 November, 2014 at 1:54 am #6012because 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
6 November, 2014 at 2:03 am #6013then again, if you are certain you do not need any of this, you can always dequeue scripts
6 November, 2014 at 3:02 pm #6019Hi Olly,
i tried to dequeue this scripts but without luck.
can you help me with this?Thanks
6 November, 2014 at 3:26 pm #6022 - AuthorPosts
- The topic ‘why you need to load JS if you disable the order option’ is closed to new replies.