<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[25594] trunk/src/wp-includes/functions.wp-styles.php: Improve inline documentation for wp-includes/functions.wp-styles.php.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/25594">25594</a></dd>
<dt>Author</dt> <dd>DrewAPicture</dd>
<dt>Date</dt> <dd>2013-09-24 02:23:09 +0000 (Tue, 24 Sep 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Improve inline documentation for wp-includes/functions.wp-styles.php.

Props kpdesign.
Fixes <a href="http://core.trac.wordpress.org/ticket/25401">#25401</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesfunctionswpstylesphp">trunk/src/wp-includes/functions.wp-styles.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesfunctionswpstylesphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/functions.wp-styles.php (25593 => 25594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/functions.wp-styles.php    2013-09-24 02:03:41 UTC (rev 25593)
+++ trunk/src/wp-includes/functions.wp-styles.php       2013-09-24 02:23:09 UTC (rev 25594)
</span><span class="lines">@@ -1,21 +1,27 @@
</span><span class="cx"> <?php
</span><span class="cx"> /**
</span><del>- * BackPress styles procedural API.
</del><ins>+ * BackPress Styles Procedural API
</ins><span class="cx">  *
</span><del>- * @package BackPress
- * @since r79
</del><ins>+ * @since 2.6.0
+ *
+ * @package WordPress
+ * @subpackage BackPress
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Display styles that are in the queue or part of $handles.
</del><ins>+ * Display styles that are in the $handles queue.
</ins><span class="cx">  *
</span><del>- * @since r79
- * @uses do_action() Calls 'wp_print_styles' hook.
- * @global object $wp_styles The WP_Styles object for printing styles.
</del><ins>+ * Passing an empty array to $handles prints the queue,
+ * passing an array with one string prints that style,
+ * and passing an array of strings prints those styles.
+ * 
+ * @see do_action() Calls 'wp_print_styles' hook.
+ * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
</ins><span class="cx">  *
</span><del>- * @param array|bool $handles Styles to be printed. An empty array prints the queue,
- *  an array with one string prints that style, and an array of strings prints those styles.
- * @return bool True on success, false on failure.
</del><ins>+ * @since 2.6.0
+ *
+ * @param array|bool $handles Styles to be printed. Default 'false'.
+ * @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array.
</ins><span class="cx">  */
</span><span class="cx"> function wp_print_styles( $handles = false ) {
</span><span class="cx">  if ( '' === $handles ) // for wp_head
</span><span class="lines">@@ -40,15 +46,21 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Adds extra CSS.
</del><ins>+ * Add extra CSS styles to a registered stylesheet.
</ins><span class="cx">  *
</span><del>- * Works only if the stylesheet has already been added.
- * Accepts a string $data containing the CSS. If two or more CSS code blocks are
- * added to the same stylesheet $handle, they will be printed in the order
</del><ins>+ * Styles will only be added if the stylesheet in already in the queue.
+ * Accepts a string $data containing the CSS. If two or more CSS code blocks
+ * are added to the same stylesheet $handle, they will be printed in the order
</ins><span class="cx">  * they were added, i.e. the latter added styles can redeclare the previous.
</span><span class="cx">  *
</span><ins>+ * @see WP_Styles::add_inline_style()
+ * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
+ *
</ins><span class="cx">  * @since 3.3.0
</span><del>- * @see WP_Scripts::add_inline_style()
</del><ins>+ *
+ * @param string $handle Name of the stylesheet to add the extra styles to. Must be lowercase.
+ * @param string $data   String containing the CSS styles to be added.
+ * @return bool True on success, false on failure.
</ins><span class="cx">  */
</span><span class="cx"> function wp_add_inline_style( $handle, $data ) {
</span><span class="cx">  global $wp_styles;
</span><span class="lines">@@ -63,20 +75,22 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Register CSS style file.
</del><ins>+ * Register a CSS stylesheet.
</ins><span class="cx">  *
</span><del>- * @since r79
- * @see WP_Styles::add() For additional information.
- * @global object $wp_styles The WP_Styles object for printing styles.
</del><ins>+ * @see WP_Dependencies::add()
</ins><span class="cx">  * @link http://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types.
</span><ins>+ * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
</ins><span class="cx">  *
</span><del>- * @param string $handle Name of the stylesheet.
- * @param string|bool $src Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
- * @param array $deps Array of handles of any stylesheet that this stylesheet depends on.
- *  (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
- * @param string|bool $ver String specifying the stylesheet version number. Set to null to disable.
- *  Used to ensure that the correct version is sent to the client regardless of caching.
- * @param string $media The media for which this stylesheet has been defined.
</del><ins>+ * @since 2.6.0
+ *
+ * @param string      $handle Name of the stylesheet.
+ * @param string|bool $src    Path to the stylesheet from the WordPress root directory. Example: '/css/mystyle.css'.
+ * @param array       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
+ * @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'.
</ins><span class="cx">  */
</span><span class="cx"> function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
</span><span class="cx">  global $wp_styles;
</span><span class="lines">@@ -91,13 +105,14 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Remove a registered CSS file.
</del><ins>+ * Remove a registered stylesheet.
</ins><span class="cx">  *
</span><del>- * @since r79
- * @see WP_Styles::remove() For additional information.
- * @global object $wp_styles The WP_Styles object for printing styles.
</del><ins>+ * @see WP_Dependencies::remove()
+ * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
</ins><span class="cx">  *
</span><del>- * @param string $handle Name of the stylesheet.
</del><ins>+ * @since 2.1.0
+ *
+ * @param string $handle Name of the stylesheet to be removed.
</ins><span class="cx">  */
</span><span class="cx"> function wp_deregister_style( $handle ) {
</span><span class="cx">  global $wp_styles;
</span><span class="lines">@@ -112,23 +127,25 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Enqueue a CSS style file.
</del><ins>+ * Enqueue a CSS stylesheet.
</ins><span class="cx">  *
</span><del>- * Registers the style if src provided (does NOT overwrite) and enqueues.
</del><ins>+ * Registers the style if source provided (does NOT overwrite) and enqueues.
</ins><span class="cx">  *
</span><del>- * @since r79
- * @see WP_Styles::add(), WP_Styles::enqueue()
- * @global object $wp_styles The WP_Styles object for printing styles.
</del><ins>+ * @see WP_Dependencies::add(), WP_Dependencies::enqueue()
</ins><span class="cx">  * @link http://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types.
</span><ins>+ * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
</ins><span class="cx">  *
</span><del>- * @param string $handle Name of the stylesheet.
- * @param string|bool $src Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
- * @param array $deps Array of handles (names) of any stylesheet that this stylesheet depends on.
- *  (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
- * @param string|bool $ver String specifying the stylesheet version number, if it has one. This parameter
- *  is used 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 The media for which this stylesheet has been defined.
</del><ins>+ * @since 2.6.0
+ *
+ * @param string      $handle Name of the stylesheet.
+ * @param string|bool $src    Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
+ * @param array       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
+ * @param string|bool $ver    String specifying the stylesheet version number, if it has one. This parameter is used
+ *                            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'.
</ins><span class="cx">  */
</span><span class="cx"> function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
</span><span class="cx">  global $wp_styles;
</span><span class="lines">@@ -147,10 +164,14 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Remove an enqueued style.
</del><ins>+ * Remove a previously enqueued CSS stylesheet.
</ins><span class="cx">  *
</span><ins>+ * @see WP_Dependencies::dequeue()
+ * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
+ *
</ins><span class="cx">  * @since 3.1.0
</span><del>- * @see WP_Styles::dequeue() For parameter information.
</del><ins>+ *
+ * @param string $handle Name of the stylesheet to be removed.
</ins><span class="cx">  */
</span><span class="cx"> function wp_dequeue_style( $handle ) {
</span><span class="cx">  global $wp_styles;
</span><span class="lines">@@ -165,19 +186,16 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Check whether style has been added to WordPress Styles.
</del><ins>+ * Check whether a CSS stylesheet has been added to the queue.
</ins><span class="cx">  *
</span><del>- * By default, checks if the style has been enqueued. You can also
- * pass 'registered' to $list, to see if the style is registered,
- * and you can check processing statuses with 'to_do' and 'done'.
</del><ins>+ * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.8.0
</span><del>- * @global object $wp_styles The WP_Styles object for printing styles.
</del><span class="cx">  *
</span><span class="cx">  * @param string $handle Name of the stylesheet.
</span><del>- * @param string $list Optional. Defaults to 'enqueued'. Values are
- *     'registered', 'enqueued' (or 'queue'), 'to_do', and 'done'.
- * @return bool Whether style is in the list.
</del><ins>+ * @param string $list   Optional. Status of the stylesheet to check. Default 'enqueued'.
+ *                       Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
+ * @return bool Whether style is queued.
</ins><span class="cx">  */
</span><span class="cx"> function wp_style_is( $handle, $list = 'enqueued' ) {
</span><span class="cx">  global $wp_styles;
</span><span class="lines">@@ -192,24 +210,25 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Add metadata to CSS style files.
</del><ins>+ * Add metadata to a CSS stylesheet.
</ins><span class="cx">  *
</span><span class="cx">  * Works only if the stylesheet has already been added.
</span><ins>+ *
</ins><span class="cx">  * Possible values for $key and $value:
</span><ins>+ * 'conditional' string      Comments for IE 6, lte IE 7 etc.
+ * 'rtl'         bool|string To declare an RTL stylesheet.
+ * 'suffix'      string      Optional suffix, used in combination with RTL.
+ * 'alt'         bool        For rel="alternate stylesheet".
+ * 'title'       string      For preferred/alternate stylesheets.
</ins><span class="cx">  *
</span><del>- * conditional string      comments for IE 6, lte IE 7 etc.
- * rtl         bool|string to declare an RTL stylesheet
- * suffix      string      optional suffix, used in combination with RTL
- * alt         bool        for rel="alternate stylesheet"
- * title       string      for preferred/alternate stylesheets
</del><ins>+ * @see WP_Dependency::add_data()
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.6.0
</span><del>- * @see WP_Dependencies::add_data()
</del><span class="cx">  *
</span><del>- * @param string $handle Script name.
- * @param string $key Name of data point for which we're storing a value.
- *  Values are 'conditional', 'rtl', and 'suffix', and 'alt', 'title'.
- * @param mixed $data
</del><ins>+ * @param string $handle Name of the stylesheet.
+ * @param string $key    Name of data point for which we're storing a value.
+ *                       Accepts 'conditional', 'rtl' and 'suffix', 'alt' and 'title'.
+ * @param mixed  $data   String containing the CSS data to be added.
</ins><span class="cx">  * @return bool True on success, false on failure.
</span><span class="cx">  */
</span><span class="cx"> function wp_style_add_data( $handle, $key, $value ) {
</span></span></pre>
</div>
</div>

</body>
</html>