Make WordPress Core

Changeset 43583


Ignore:
Timestamp:
08/27/2018 02:33:35 PM (6 years ago)
Author:
johnbillion
Message:

Docs: Improve inline documentation for WP_Scripts.

Props desrosj

See #42505

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class.wp-scripts.php

    r43565 r43583  
    205205        }
    206206
    207         echo "<script type='text/javascript'>\n"; // CDATA and type='text/javascript' is not needed for HTML 5
     207        echo "<script type='text/javascript'>\n"; // CDATA and type='text/javascript' is not needed for HTML 5.
    208208        echo "/* <![CDATA[ */\n";
    209209        echo "$output\n";
     
    222222     * @see WP_Dependencies::do_item()
    223223     *
    224      * @param string $handle    The script's registered handle.
     224     * @param string    $handle The script's registered handle.
    225225     * @param int|false $group  Optional. Group level: (int) level, (false) no groups. Default false.
    226226     * @return bool True on success, false on failure.
     
    402402     * @param string $position Optional. Whether to add the inline script before the handle
    403403     *                         or after. Default 'after'.
    404      * @param bool $echo       Optional. Whether to echo the script instead of just returning it.
     404     * @param bool   $echo     Optional. Whether to echo the script instead of just returning it.
    405405     *                         Default true.
    406406     * @return string|false Script on success, false otherwise.
     
    427427     * @since 2.1.0
    428428     *
    429      * @param string $handle
    430      * @param string $object_name
    431      * @param array $l10n
    432      * @return bool
     429     * @param string $handle      Name of the script to attach data to.
     430     * @param string $object_name Name of the variable that will contain the data.
     431     * @param array  $l10n        Array of data to localize.
     432     * @return bool True on success, false on failure.
    433433     */
    434434    public function localize( $handle, $object_name, $l10n ) {
     
    437437        }
    438438
    439         if ( is_array( $l10n ) && isset( $l10n['l10n_print_after'] ) ) { // back compat, preserve the code in 'l10n_print_after' if present
     439        if ( is_array( $l10n ) && isset( $l10n['l10n_print_after'] ) ) { // back compat, preserve the code in 'l10n_print_after' if present.
    440440            $after = $l10n['l10n_print_after'];
    441441            unset( $l10n['l10n_print_after'] );
Note: See TracChangeset for help on using the changeset viewer.