Make WordPress Core

Changeset 27732


Ignore:
Timestamp:
03/26/2014 05:51:45 AM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-includes/script-loader.php.

Fixes #27520.

File:
1 edited

Legend:

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

    r27640 r27732  
    118118    $scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
    119119    did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings',
     120        /**
     121         * Filter the Heartbeat settings.
     122         *
     123         * @since 3.6.0
     124         *
     125         * @param array $settings Heartbeat settings array.
     126         */
    120127        apply_filters( 'heartbeat_settings', array() )
    121128    );
     
    124131    did_action( 'init' ) && $scripts->localize( 'wp-auth-check', 'authcheckL10n', array(
    125132        'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),
     133
     134        /**
     135         * Filter the authentication check interval.
     136         *
     137         * @since 3.6.0
     138         *
     139         * @param int $interval The interval in which to check a user's authentication.
     140         *                      Default 3 minutes in seconds, or 180.
     141         */
    126142        'interval' => apply_filters( 'wp_auth_check_interval', 3 * MINUTE_IN_SECONDS ),
    127143    ) );
     
    762778    $wp_scripts->do_head_items();
    763779
    764     if ( apply_filters('print_head_scripts', true) )
     780    /**
     781     * Filter whether to print the head scripts.
     782     *
     783     * @since 2.8.0
     784     *
     785     * @param bool $print Whether to print the head scripts. Default true.
     786     */
     787    if ( apply_filters( 'print_head_scripts', true ) ) {
    765788        _print_scripts();
     789    }
    766790
    767791    $wp_scripts->reset();
     
    784808    $wp_scripts->do_footer_items();
    785809
    786     if ( apply_filters('print_footer_scripts', true) )
     810    /**
     811     * Filter whether to print the footer scripts.
     812     *
     813     * @since 2.8.0
     814     *
     815     * @param bool $print Whether to print the footer scripts. Default true.
     816     */
     817    if ( apply_filters( 'print_footer_scripts', true ) ) {
    787818        _print_scripts();
     819    }
    788820
    789821    $wp_scripts->reset();
     
    860892 */
    861893function wp_print_footer_scripts() {
    862     do_action('wp_print_footer_scripts');
     894    /**
     895     * Fires when footer scripts are printed.
     896     *
     897     * @since 2.8.0
     898     */
     899    do_action( 'wp_print_footer_scripts' );
    863900}
    864901
     
    872909 */
    873910function wp_enqueue_scripts() {
    874     do_action('wp_enqueue_scripts');
     911    /**
     912     * Fires when scripts and styles are enqueued.
     913     *
     914     * @since 2.8.0
     915     */
     916    do_action( 'wp_enqueue_scripts' );
    875917}
    876918
     
    894936    $wp_styles->do_items(false);
    895937
    896     if ( apply_filters('print_admin_styles', true) )
     938    /**
     939     * Filter whether to print the admin styles.
     940     *
     941     * @since 2.8.0
     942     *
     943     * @param bool $print Whether to print the admin styles. Default true.
     944     */
     945    if ( apply_filters( 'print_admin_styles', true ) ) {
    897946        _print_styles();
     947    }
    898948
    899949    $wp_styles->reset();
     
    915965    $wp_styles->do_footer_items();
    916966
    917     if ( apply_filters('print_late_styles', true) )
     967    /**
     968     * Filter whether to print the styles queued too late for the HTML head.
     969     *
     970     * @since 3.3.0
     971     *
     972     * @param bool $print Whether to print the 'late' styles. Default true.
     973     */
     974    if ( apply_filters( 'print_late_styles', true ) ) {
    918975        _print_styles();
     976    }
    919977
    920978    $wp_styles->reset();
Note: See TracChangeset for help on using the changeset viewer.