WordPress.org

Make WordPress Core

Changeset 32623


Ignore:
Timestamp:
05/27/2015 07:33:41 PM (6 years ago)
Author:
wonderboymusic
Message:

Add missing doc blocks to script-loader.php.
Use wp_styles() and wp_scripts() where appropriate.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r32211 r32623  
    4646 * @since 2.6.0
    4747 *
    48  * @param object $scripts WP_Scripts object.
     48 * @param WP_Scripts $scripts WP_Scripts object.
    4949 */
    5050function wp_default_scripts( &$scripts ) {
     
    609609 * @since 2.6.0
    610610 *
    611  * @param object $styles
     611 * @param WP_Styles $styles
    612612 */
    613613function wp_default_styles( &$styles ) {
     
    767767 *
    768768 * @since 2.6.0
    769  * @uses $_wp_admin_css_colors
    770  *
    771  * @param string $src Source URL.
     769 * @global array $_wp_admin_css_colors
     770 *
     771 * @param string $src    Source URL.
    772772 * @param string $handle Either 'colors' or 'colors-rtl'.
    773  * @return string URL path to CSS stylesheet for Administration Screens.
     773 * @return string|false URL path to CSS stylesheet for Administration Screens.
    774774 */
    775775function wp_style_loader_src( $src, $handle ) {
     
    813813 *
    814814 * @see wp_print_scripts()
     815 *
     816 * @global bool $concatenate_scripts
     817 *
     818 * @return array
    815819 */
    816820function print_head_scripts() {
    817     global $wp_scripts, $concatenate_scripts;
     821    global $concatenate_scripts;
    818822
    819823    if ( ! did_action('wp_print_scripts') ) {
     
    822826    }
    823827
    824     if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    825         $wp_scripts = new WP_Scripts();
    826     }
     828    $wp_scripts = wp_scripts();
    827829
    828830    script_concat_settings();
     
    849851 *
    850852 * @since 2.8.0
     853 *
     854 * @global WP_Scripts $wp_scripts
     855 * @global bool       $concatenate_scripts
     856 *
     857 * @return array
    851858 */
    852859function print_footer_scripts() {
     
    879886 *
    880887 * @ignore
     888 *
     889 * @global WP_Scripts $wp_scripts
     890 * @global bool       $compress_scripts
    881891 */
    882892function _print_scripts() {
     
    915925 *
    916926 * @since 2.8.0
     927 *
     928 * @global WP_Scripts $wp_scripts
     929 *
     930 * @return array
    917931 */
    918932function wp_print_head_scripts() {
     
    975989 *
    976990 * @since 2.8.0
     991 *
     992 * @global bool $concatenate_scripts
     993 *
     994 * @return array
    977995 */
    978996function print_admin_styles() {
    979     global $wp_styles, $concatenate_scripts;
    980 
    981     if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    982         $wp_styles = new WP_Styles();
    983     }
     997    global $concatenate_scripts;
     998
     999    $wp_styles = wp_styles();
    9841000
    9851001    script_concat_settings();
     
    10061022 *
    10071023 * @since 3.3.0
     1024 *
     1025 * @global WP_Styles $wp_styles
     1026 * @global bool      $concatenate_scripts
     1027 *
     1028 * @return array|void
    10081029 */
    10091030function print_late_styles() {
     
    10361057 *
    10371058 * @ignore
     1059 *
     1060 * @global bool $compress_css
    10381061 */
    10391062function _print_styles() {
    1040     global $wp_styles, $compress_css;
     1063    global $compress_css;
     1064
     1065    $wp_styles = wp_styles();
    10411066
    10421067    $zip = $compress_css ? 1 : 0;
     
    10651090 *
    10661091 * @since 2.8.0
     1092 *
     1093 * @global bool $concatenate_scripts
     1094 * @global bool $compress_scripts
     1095 * @global bool $compress_css
    10671096 */
    10681097function script_concat_settings() {
Note: See TracChangeset for help on using the changeset viewer.