Make WordPress Core


Ignore:
Timestamp:
03/14/2016 10:36:26 PM (8 years ago)
Author:
johnbillion
Message:

Docs: Improvements and corrections for the $ver parameter of the dependencies API functions.

See #32246

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.wp-styles.php

    r36744 r36993  
    7777 * @since 3.3.0
    7878 *
    79  * @param string $handle Name of the stylesheet to add the extra styles to. Must be lowercase.
     79 * @param string $handle Name of the stylesheet to add the extra styles to.
    8080 * @param string $data   String containing the CSS styles to be added.
    8181 * @return bool True on success, false on failure.
     
    101101 * @since 4.3.0 A return value was added.
    102102 *
    103  * @param string      $handle Name of the stylesheet.
    104  * @param string|bool $src    Path to the stylesheet from the WordPress root directory. Example: '/css/mystyle.css'.
    105  * @param array       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
    106  * @param string|bool $ver    String specifying the stylesheet version number. Used to ensure that the correct version
    107  *                            is sent to the client regardless of caching. Default 'false'. Accepts 'false', 'null', or 'string'.
    108  * @param string      $media  Optional. The media for which this stylesheet has been defined.
    109  *                            Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
    110  *                            '(orientation: portrait)' and '(max-width: 640px)'.
    111  *
     103 * @param string           $handle Name of the stylesheet. Should be unique.
     104 * @param string           $src    Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
     105 * @param array            $deps   Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
     106 * @param string|bool|null $ver    Optional. String specifying stylesheet version number, if it has one, which is added to the URL
     107 *                                 as a query string for cache busting purposes. If version is set to false, a version
     108 *                                 number is automatically added equal to current installed WordPress version.
     109 *                                 If set to null, no version is added.
     110 * @param string           $media  Optional. The media for which this stylesheet has been defined.
     111 *                                 Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
     112 *                                 '(orientation: portrait)' and '(max-width: 640px)'.
    112113 * @return bool Whether the style has been registered. True on success, false on failure.
    113114 */
     
    144145 * @since 2.6.0
    145146 *
    146  * @param string      $handle Name of the stylesheet.
    147  * @param string|bool $src    Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
    148  * @param array       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
    149  * @param string|bool $ver    String specifying the stylesheet version number, if it has one. This parameter is used
    150  *                            to ensure that the correct version is sent to the client regardless of caching, and so
    151  *                            should be included if a version number is available and makes sense for the stylesheet.
    152  * @param string      $media  Optional. The media for which this stylesheet has been defined.
    153  *                            Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
    154  *                            '(orientation: portrait)' and '(max-width: 640px)'.
     147 * @param string           $handle Name of the stylesheet. Should be unique.
     148 * @param string           $src    Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
     149 * @param array            $deps   Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
     150 * @param string|bool|null $ver    Optional. String specifying stylesheet version number, if it has one, which is added to the URL
     151 *                                 as a query string for cache busting purposes. If version is set to false, a version
     152 *                                 number is automatically added equal to current installed WordPress version.
     153 *                                 If set to null, no version is added.
     154 * @param string           $media  Optional. The media for which this stylesheet has been defined.
     155 *                                 Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
     156 *                                 '(orientation: portrait)' and '(max-width: 640px)'.
    155157 */
    156158function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
Note: See TracChangeset for help on using the changeset viewer.