[ Index ]

PHP Cross Reference of Wordpress 2.9.1

title

Body

[close]

/wp-includes/ -> script-loader.php (summary)

WordPress scripts and styles default loader. Most of the functionality that existed here was moved to {@link http://backpress.automattic.com/ BackPress}. WordPress themes and plugins will only be concerned about the filters and actions set in this file.

File Size: 740 lines (32 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 5 files
 wp-includes/class.wp-scripts.php
 wp-includes/functions.wp-styles.php
 wp-includes/functions.wp-scripts.php
 wp-includes/class.wp-dependencies.php
 wp-includes/class.wp-styles.php

Defines 13 functions

  wp_default_scripts()
  wp_default_styles()
  wp_prototype_before_jquery()
  wp_just_in_time_script_localization()
  wp_style_loader_src()
  print_head_scripts()
  print_footer_scripts()
  _print_scripts()
  wp_print_head_scripts()
  wp_print_footer_scripts()
  wp_enqueue_scripts()
  print_admin_styles()
  script_concat_settings()

Functions
Functions that are not part of a class:

wp_default_scripts( &$scripts )   X-Ref
Setup WordPress scripts to load by default for Administration Panels.

Localizes a few of the scripts.
$scripts->add_data( 'script-handle', 'group', 1 ); queues the script for the footer

param: object $scripts WP_Scripts object.

wp_default_styles( &$styles )   X-Ref
Assign default styles to $styles object.

Nothing is returned, because the $styles parameter is passed by reference.
Meaning that whatever object is passed will be updated without having to
reassign the variable that was passed back to the same value. This saves
memory.

Adding default styles is not the only task, it also assigns the base_url
property, the default version, and text direction for the object.

param: object $styles

wp_prototype_before_jquery( $js_array )   X-Ref
Reorder JavaScript scripts array to place prototype before jQuery.

param: array $js_array JavaScript scripst array
return: array Reordered array, if needed.

wp_just_in_time_script_localization()   X-Ref
Load localized script just in time for MCE.

These localizations require information that may not be loaded even by init.


wp_style_loader_src( $src, $handle )   X-Ref
Administration Panel CSS for changing the styles.

If installing the 'wp-admin/' directory will be replaced with './'.

The $_wp_admin_css_colors global manages the Administration Panels CSS
stylesheet that is loaded. The option that is set is 'admin_color' and is the
color and key for the array. The value for the color key is an object with
a 'url' parameter that has the URL path to the CSS file.

The query from $src parameter will be appended to the URL that is given from
the $_wp_admin_css_colors array value URL.

param: string $src Source URL.
param: string $handle Either 'colors' or 'colors-rtl'.
return: string URL path to CSS stylesheet for Administration Panels.

print_head_scripts()   X-Ref
Prints the script queue in the HTML head on admin pages.

Postpones the scripts that were queued for the footer.
print_footer_scripts() is called in the footer to print these scripts.


print_footer_scripts()   X-Ref
Prints the scripts that were queued for the footer on admin pages.


_print_scripts()   X-Ref
No description

wp_print_head_scripts()   X-Ref
Prints the script queue in the HTML head on the front end.

Postpones the scripts that were queued for the footer.
wp_print_footer_scripts() is called in the footer to print these scripts.


wp_print_footer_scripts()   X-Ref
Prints the scripts that were queued for the footer on the front end.


wp_enqueue_scripts()   X-Ref
Wrapper for do_action('wp_enqueue_scripts')

Allows plugins to queue scripts for the front end using wp_enqueue_script().
Runs first in wp_head() where all is_home(), is_page(), etc. functions are available.


print_admin_styles()   X-Ref
No description

script_concat_settings()   X-Ref
No description



Generated: Fri Jan 8 00:19:48 2010 Cross-referenced by PHPXref 0.7