Included Scripts and Styles

From StartBox Documentation

Jump to: navigation, search

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

Stylesheets

Layouts

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox