Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
TURN enqueue ON/OFF
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jean page  
View profile  
 More options Apr 27 2012, 11:31 am
From: jean page <passalo...@gmail.com>
Date: Fri, 27 Apr 2012 08:31:28 -0700 (PDT)
Local: Fri, Apr 27 2012 11:31 am
Subject: TURN enqueue ON/OFF
I was wondering why I don't see anyway to use the JS libraries that
already come packaged in a WP install? All that stuff which is used on
the admin side. Shouldn't there be a way to just reference and use any
of those scripts on the public side of your Wordpress UI.

Thanks,
Jean


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brandtley McMinn  
View profile  
 More options Apr 27 2012, 8:30 pm
From: Brandtley McMinn <bmcminn...@gmail.com>
Date: Fri, 27 Apr 2012 19:30:04 -0500
Local: Fri, Apr 27 2012 8:30 pm
Subject: Re: [wordpress-austin] TURN enqueue ON/OFF

Hey Jean,

You can request any one of the various libraries WordPress comes
pre-packaged with using the wp_enqueue_script function in your theme or
plugins' functions.php file:

http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Defau...

This section of the codex outlines the various libraries you can utilize
and all you have to do is use the corresponding handle as an argument in
the function. I would write a function that handles loading of all my
frontend scripts and hook into 'wp_enqueue_scripts' to load them on the
frontend. A basic implementation could look something like this:

<?php

   // Add necessary JS scripts to frontend
   add_action('wp_enqueue_scripts', 'MYTHEME_frontend_js_scripts');

   function MYTHEME_frontend_js_scripts() {
     wp_enqueue_script('jquery');
     wp_enqueue_script('jquery-ui-core', false, array('jquery'));
     wp_enqueue_script('jquery-ui-mouse',false , array('jquery'));
     wp_enqueue_script('thickbox');
     wp_enqueue_script('jquery-hotkeys',false , array('jquery'));
   }

?>

The same could be done for a plugin or theme requiring certain libraries
on the admin side by hooking into the 'admin_enqueue_scripts' action.

Hope this helps,

--
Brandtley McMinn - Owner/Creative Director
http://giggleboxstudios.net
c. 512.406.1666
@brandtleymcminn <http://twitter.com/#%21/brandtleymcminn>
<http://giggleboxstudios.net>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »