WordPress.org

Make WordPress Core

Changeset 32566


Ignore:
Timestamp:
05/24/2015 05:04:39 AM (5 years ago)
Author:
wonderboymusic
Message:

Add missing doc blocks to class.wp-(scripts|styles).php.

See #32444.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r32124 r32566  
    6262    }
    6363
    64     // Deprecated since 3.3, see print_extra_script()
     64    /**
     65     * @deprecated 3.3
     66     * @see print_extra_script()
     67     *
     68     * @param string $handle
     69     * @param bool   $echo
     70     * @return bool|string|null
     71     */
    6572    public function print_scripts_l10n( $handle, $echo = true ) {
    6673        _deprecated_function( __FUNCTION__, '3.3', 'print_extra_script()' );
     
    6875    }
    6976
     77    /**
     78     * @param string $handle
     79     * @param bool   $echo
     80     * @return bool|string|null
     81     */
    7082    public function print_extra_script( $handle, $echo = true ) {
    7183        if ( !$output = $this->get_data( $handle, 'data' ) )
     
    8496    }
    8597
     98    /**
     99     * @param string   $handle Name of the item. Should be unique.
     100     * @param int|bool $group
     101     * @return bool True on success, false if not set.
     102     */
    86103    public function do_item( $handle, $group = false ) {
    87104        if ( !parent::do_item($handle) )
     
    164181        $tag = "{$cond_before}<script type='text/javascript' src='$src'></script>\n{$cond_after}";
    165182
    166         /** 
     183        /**
    167184         * Filter the HTML script tag of an enqueued script.
    168185         *
     
    185202
    186203    /**
    187      * Localizes a script
     204     * Localizes a script, only if the script has already been added
    188205     *
    189      * Localizes only if the script has already been added
     206     * @param string $handle
     207     * @param string $object_name
     208     * @param array $l10n
     209     * @return bool
    190210     */
    191211    public function localize( $handle, $object_name, $l10n ) {
     
    218238    }
    219239
     240    /**
     241     * @param string $handle    Name of the item. Should be unique.
     242     * @param bool   $recursion Internal flag that calling function was called recursively.
     243     * @param mixed  $group     Group level.
     244     * @return bool Not already in the group or a lower group
     245     */
    220246    public function set_group( $handle, $recursion, $group = false ) {
    221 
    222247        if ( $this->registered[$handle]->args === 1 )
    223248            $grp = 1;
     
    231256    }
    232257
     258    /**
     259     * @param mixed $handles   Item handle and argument (string) or item handles and arguments (array of strings).
     260     * @param bool  $recursion Internal flag that function is calling itself.
     261     * @param mixed $group     Group level: (int) level, (false) no groups.
     262     * @return bool True on success, false on failure.
     263     */
    233264    public function all_deps( $handles, $recursion = false, $group = false ) {
    234265        $r = parent::all_deps( $handles, $recursion );
     
    246277    }
    247278
     279    /**
     280     * @return array
     281     */
    248282    public function do_head_items() {
    249283        $this->do_items(false, 0);
     
    251285    }
    252286
     287    /**
     288     * @return array
     289     */
    253290    public function do_footer_items() {
    254291        $this->do_items(false, 1);
     
    256293    }
    257294
     295    /**
     296     * @param string $src
     297     * @return bool
     298     */
    258299    public function in_default_dir( $src ) {
    259300        if ( ! $this->default_dirs ) {
  • trunk/src/wp-includes/class.wp-styles.php

    r31031 r32566  
    235235    }
    236236
     237    /**
     238     * @return array
     239     */
    237240    public function do_footer_items() { // HTML 5 allows styles in the body, grab late enqueued items and output them in the footer.
    238241        $this->do_items(false, 1);
Note: See TracChangeset for help on using the changeset viewer.