bcworkz on "Imagemapster Jquery Plugin"

ساخت وبلاگ

What you have so far looks good, nice work! It's always a good idea to check the resulting meta link to verify the path is correct, it's surprisingly easy to get this wrong. At least in my experience ;)

You can enqueue other jQuery scripts the same way, ensuring the handle is not used by anything else. It's always a good idea to add some unique initials to the beginning of handle and function names to help ensure a unique name. Name conflicts can be very hard to track down, better to avoid the situation! For example, I may have called my action callback function bcw_add_script and the handle 'bcw_header'.

Be sure to specify the 'jquery' dependency in each case. You may have noticed there is also a wp_register_script() function. You don't need to use it if you enqueue everything, but another way to get all the scripts loaded in the right order is to register all of these intermediate scripts, then when you enqueue your script, include all the registered handles in the dependency array. For example, you could register imagemapster.js as 'imagemapster' (specifying 'jquery' dependency in the registration function).

Then in your add_my_script enqueue call, the dependency array would be array('imagemapster', 'jquery',). This is equivalent to enqueuing each script separately. Which way you go is a matter of preference. Many people are confused about how register and enqueue are similar but different, I hope I've somewhat clarified this.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 161 تاريخ : شنبه 1 خرداد 1395 ساعت: 23:55