diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index e9c9be2d7..5fdadc465 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -1,11 +1,39 @@ base_url = $guessurl; $styles->default_version = get_bloginfo( 'version' ); @@ -254,6 +300,15 @@ function wp_default_styles( &$styles ) { $styles->add_data( $rtl_style, 'rtl', true ); } +/** + * Reorder JavaScript scripts array to place prototype before jQuery. + * + * @since 2.3.1 + * + * @param array $js_array JavaScript scripst array + * @return array Reordered array, if needed. + */ + function wp_prototype_before_jquery( $js_array ) { if ( false === $jquery = array_search( 'jquery', $js_array ) ) return $js_array; @@ -271,7 +326,13 @@ function wp_prototype_before_jquery( $js_array ) { return $js_array; } -// These localizations require information that may not be loaded even by init +/** + * Load localized script just in time for MCE. + * + * These localizations require information that may not be loaded even by init. + * + * @since 2.5.0 + */ function wp_just_in_time_script_localization() { wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); wp_localize_script( 'autosave', 'autosaveL10n', array( @@ -283,6 +344,26 @@ function wp_just_in_time_script_localization() { ) ); } +/** + * 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. + * + * @since 2.6.0 + * @uses $_wp_admin_css_colors + * + * @param string $src Source URL. + * @param string $handle Either 'colors' or 'colors-rtl'. + * @return string URL path to CSS stylesheet for Administration Panels. + */ function wp_style_loader_src( $src, $handle ) { if ( defined('WP_INSTALLING') ) return preg_replace( '#^wp-admin/#', './', $src );