Included Scripts and Styles
From StartBox Docs
Contents |
Introduction
Below are all the scripts and styles that are included with StartBox. Many of these are registered and active by default, some you'll have to manually include.
Usage
To include a script or style, WordPress has two useful functions that will load them in their proper locations and prevent you from loading the same script or style more than once. To include a script, you'll use wp_enqueue_script(). To include a style, you'll use wp_enqueue_style().
If you wanted to include the Colorbox script and stylesheet, for example, you could use the following:
function my_scripts_and_styles() {
wp_enqueue_script('colorbox');
wp_enqueue_style('colorbox');
}
add_action( 'template_redirect', 'my_scripts_and_styles' );
Note: by hooking these functions into template_redirect we're ensuring they are placed in exactly the right spot.
To unregister a script or style, you can use wp_deregister_script() or wp_dequeue_style(), respectively.
Scripts
- colorbox
(/includes/scripts/jquery.colorbox.min.js)- Creates beautiful modal windows. Included by default. Give your links a class of colorbox or ext to activate colorbox. - galleriffic -
(/includes/scripts/query.galleriffic.min.js)- Improves the default WordPress [gallery] shortcode. - pushup
(/includes/scripts/jquery-pushup/jquery.pushup.js)- Gently remind users of older browsers to upgrade. Selectively included via Theme Options. - startbox
(/includes/scripts/defaults.js)- Some defaults to assist with triggering other scripts, specifically Colorbox, form hinting, and enabling some nice Comment Form features. Included by default. - md5
(/includes/scripts/jquery.md5.js)- jQuery script for md5 hashing of e-mails. Necessary for gravitar functionality in defaults.js. Included by default.
Stylesheets
- admin
(/includes/styles/defaults/admin.css)- Styles for Theme Options page only. Automatically loaded. - colorbox
(/includes/styles/defaults/colorbox.css)- Defaults for the Colorbox modal window. Included by default. - comments
(/includes/styles/defaults/comments.css)- Styles for comments and the comment form. - editor
(/includes/styles/defaults/editor.css)- Styles for the WYSIWYG editor. Automatically loaded. - images
(/includes/styles/defaults/images.css)- Handles image and caption styling. - print
(/includes/styles/defaults/print.css)- Cleans up the layout for printing. Included by default. - pushup
(/includes/scripts/jquery-pushup/pushup.css)- Necessary styles for the Pushup script. Included by default. - reset
(/includes/styles/defaults/reset.css)- Global style reset based on Eric Meyer's reset. - shortcodes
(/includes/styles/defaults/shortcodes.css)- Default styles for all the shortcodes - startbox
(/includes/styles/defaults/startbox.css)- Default styles for navigation, sidebars, content, widgets, etc. - typography
(/includes/styles/defaults/typography.css)- Some standards for nice typography.
Layouts
- one-col
(/includes/styles/layouts/1cb.css)- One Column, no sidebars (selectively included via Theme Options) - two-col-left
(/includes/styles/layouts/2cl.css)- Two Column, sidebar on left (selectively included via Theme Options) - two-col-right
(/includes/styles/layouts/2cr.css)- Two Column, sidebar on right (selectively included via Theme Options) - three-col-left
(/includes/styles/layouts/3cl.css)- Three Column, sidebars on left (selectively included via Theme Options) - three-col-right
(/includes/styles/layouts/3cr.css)- Three Column, sidebars on right (selectively included via Theme Options) - three-col-both
(/includes/styles/layouts/3cb.css)- Three Column, sidebars on either side (selectively included via Theme Options)