Make WordPress Core


Ignore:
Timestamp:
02/23/2016 08:40:43 PM (9 years ago)
Author:
ocean90
Message:

Styles: Clarify the allowed values for the $media parameter of wp_register_style()/wp_enqueue_style().

Adds unit test.

Fixes #35921.

File:
1 edited

Legend:

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

    r36074 r36649  
    107107 *                            is sent to the client regardless of caching. Default 'false'. Accepts 'false', 'null', or 'string'.
    108108 * @param string      $media  Optional. The media for which this stylesheet has been defined.
    109  *                            Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
    110  *                            'screen', 'tty', or 'tv'.
     109 *                            Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
     110 *                            '(orientation: portrait)' and '(max-width: 640px)'.
     111 *
    111112 * @return bool Whether the style has been registered. True on success, false on failure.
    112113 */
     
    150151 *                            should be included if a version number is available and makes sense for the stylesheet.
    151152 * @param string      $media  Optional. The media for which this stylesheet has been defined.
    152  *                            Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
    153  *                            'screen', 'tty', or 'tv'.
     153 *                            Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
     154 *                            '(orientation: portrait)' and '(max-width: 640px)'.
    154155 */
    155156function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
Note: See TracChangeset for help on using the changeset viewer.