Styles: Clarify the allowed values for the `$media` parameter of `wp_register_style()`/`wp_enqueue_style()`.
Adds unit test. Fixes #35921. Built from https://develop.svn.wordpress.org/trunk@36649 git-svn-id: http://core.svn.wordpress.org/trunk@36616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
383c422527
commit
57aec38add
|
@ -106,8 +106,9 @@ function wp_add_inline_style( $handle, $data ) {
|
|||
* @param string|bool $ver String specifying the stylesheet version number. Used to ensure that the correct version
|
||||
* is sent to the client regardless of caching. Default 'false'. Accepts 'false', 'null', or 'string'.
|
||||
* @param string $media Optional. The media for which this stylesheet has been defined.
|
||||
* Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
|
||||
* 'screen', 'tty', or 'tv'.
|
||||
* Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
|
||||
* '(orientation: portrait)' and '(max-width: 640px)'.
|
||||
*
|
||||
* @return bool Whether the style has been registered. True on success, false on failure.
|
||||
*/
|
||||
function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
|
||||
|
@ -149,8 +150,8 @@ function wp_deregister_style( $handle ) {
|
|||
* to ensure that the correct version is sent to the client regardless of caching, and so
|
||||
* should be included if a version number is available and makes sense for the stylesheet.
|
||||
* @param string $media Optional. The media for which this stylesheet has been defined.
|
||||
* Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
|
||||
* 'screen', 'tty', or 'tv'.
|
||||
* Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
|
||||
* '(orientation: portrait)' and '(max-width: 640px)'.
|
||||
*/
|
||||
function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
|
||||
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36648';
|
||||
$wp_version = '4.5-alpha-36649';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue