[theme-reviewers] Javascript
Emil Uzelac
emil at themeid.com
Mon Apr 25 01:09:00 UTC 2011
Also, this is what I have in my functions.php for future references: (all
added in footer area as well)
/**
* A safe way of adding javascripts to a WordPress generated page.
*/
if (!is_admin())
add_action('wp_print_scripts', 'fit_js');
if (!function_exists('fit_js')) {
function fit_js() {
wp_enqueue_script('jquery');
wp_enqueue_script('modernizr', get_template_directory_uri() .
'/js/modernizr-min.js', array('jquery'), '1.7.0', true);
wp_enqueue_script('scripts', get_template_directory_uri() .
'/js/scripts.js', array('jquery'), '1.0.4', true);
wp_enqueue_script('functions', get_template_directory_uri() .
'/js/functions.js', array('jquery'), '1.0.4', true);
}
}
*----*
*Emil Uzelac* | ThemeID | T: 224-444-0006 | Twitter: @EmilUzelac | E:
emil at themeid.com | http://themeid.com
Make everything as simple as possible, but not simpler. - Albert Einstein
On Sun, Apr 24, 2011 at 8:05 PM, Curtis McHale <curtis at curtismchale.ca>wrote:
> Alright I'll leave it to you.
>
>
> Curtis McHale
> PH: 604.751.3482
> http://www.curtismchale.ca
> Linkedin: http://www.linkedin.com/in/curtismchale
> Twitter: twitter.com/curtismchale
>
>
>
> On Sun, Apr 24, 2011 at 5:48 PM, Chip Bennett <chip at chipbennett.net>wrote:
>
>> I've got a few related Guidelines that were discussed on the Make site,
>> that I need to add. I'll take a look at it tomorrow. :)
>>
>> Chip
>>
>>
>> On Sun, Apr 24, 2011 at 7:41 PM, Curtis McHale <curtis at curtismchale.ca>wrote:
>>
>>> Where would you suggest that specific mention of this is made in the
>>> theme review guidelines? I'm happy to add it. As I read it alongside the
>>> information on internationalization since if you include new JS you must use
>>> the proper enqueue.
>>>
>>>
>>> Curtis McHale
>>> PH: 604.751.3482
>>> http://www.curtismchale.ca
>>> Linkedin: http://www.linkedin.com/in/curtismchale
>>> Twitter: twitter.com/curtismchale
>>>
>>>
>>>
>>> On Sun, Apr 24, 2011 at 5:38 PM, Chip Bennett <chip at chipbennett.net>wrote:
>>>
>>>> Yes, require that script to be enqueued properly.
>>>>
>>>> Chip
>>>>
>>>> On Sun, Apr 24, 2011 at 7:32 PM, Curtis McHale <curtis at curtismchale.ca>wrote:
>>>>
>>>>> Are themes required to enqueue javascript with the built in WordPress
>>>>> functions? I assume so but don't find specific reference to it in the theme
>>>>> reviewer docs. The theme I'm currently reviewing includes jQuery from Google
>>>>> CDN in the footer inside script tags.
>>>>>
>>>>> Curtis McHale
>>>>> PH: 604.751.3482
>>>>> http://www.curtismchale.ca
>>>>> Linkedin: http://www.linkedin.com/in/curtismchale
>>>>> Twitter: twitter.com/curtismchale
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> theme-reviewers mailing list
>>>>> theme-reviewers at lists.wordpress.org
>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> theme-reviewers mailing list
>>>> theme-reviewers at lists.wordpress.org
>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>
>>>>
>>>
>>> _______________________________________________
>>> theme-reviewers mailing list
>>> theme-reviewers at lists.wordpress.org
>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>
>>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110424/6208220d/attachment-0001.htm>
More information about the theme-reviewers
mailing list