Changeset 36744 for trunk/src/wp-includes/class.wp-styles.php
- Timestamp:
- 02/27/2016 08:33:57 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class.wp-styles.php (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class.wp-styles.php
r36733 r36744 1 1 <?php 2 2 /** 3 * BackPress Styles enqueue.3 * Dependencies API: WP_Styles class 4 4 * 5 * These classes were refactored from the WordPress WP_Scripts and WordPress 6 * script enqueue API. 5 * @since 2.6.0 7 6 * 8 * @package BackPress9 * @s ince r747 * @package WordPress 8 * @subpackage Dependencies 10 9 */ 11 10 12 11 /** 13 * BackPress Styles enqueue class.12 * Core class used to register styles. 14 13 * 15 * @package BackPress14 * @package WordPress 16 15 * @uses WP_Dependencies 17 * @since r7416 * @since 2.6.0 18 17 */ 19 18 class WP_Styles extends WP_Dependencies { … … 30 29 31 30 /** 31 * URL of the content directory. 32 32 * 33 33 * @since 2.8.0 … … 38 38 39 39 /** 40 * Default version string for stylesheets. 40 41 * 41 42 * @since 2.6.0 … … 46 47 47 48 /** 49 * The current text direction. 48 50 * 49 51 * @since 2.6.0 … … 54 56 55 57 /** 58 * Holds a list of style handles which will be concatenated. 56 59 * 57 60 * @since 2.8.0 … … 62 65 63 66 /** 64 * 65 * @since 2.8.0 67 * Holds a string which contains style handles and their version. 68 * 69 * @since 2.8.0 70 * @deprecated 3.4.0 66 71 * @access public 67 72 * @var string … … 70 75 71 76 /** 77 * Whether to perform concatenation. 72 78 * 73 79 * @since 2.8.0 … … 78 84 79 85 /** 86 * Holds HTML markup of styles and additional data if concatenation 87 * is enabled. 80 88 * 81 89 * @since 2.8.0 … … 86 94 87 95 /** 96 * Holds inline styles if concatenation is enabled. 88 97 * 89 98 * @since 3.3.0 … … 94 103 95 104 /** 105 * List of default directories. 96 106 * 97 107 * @since 2.8.0 … … 119 129 120 130 /** 121 * 122 * @since 2.6.0 123 * @access public 124 * 125 * @param string $handle 126 * @return bool 131 * Processes a style dependency. 132 * 133 * @since 2.6.0 134 * @access public 135 * 136 * @see WP_Dependencies::do_item() 137 * 138 * @param string $handle The style's registered handle. 139 * @return bool True on success, false on failure. 127 140 */ 128 141 public function do_item( $handle ) { … … 231 244 232 245 /** 246 * Adds extra CSS styles to a registered stylesheet. 233 247 * 234 248 * @since 3.3.0 235 249 * @access public 236 250 * 237 * @param string $handle 238 * @param string $code 251 * @param string $handle The style's registered handle. 252 * @param string $code String containing the CSS styles to be added. 253 * @return bool True on success, false on failure. 239 254 */ 240 255 public function add_inline_style( $handle, $code ) { … … 254 269 255 270 /** 271 * Prints extra CSS styles of a registered stylesheet. 256 272 * 257 273 * @since 3.3.0 258 274 * @access public 259 275 * 260 * @param string $handle 261 * @param bool $echo 262 * @return bool 276 * @param string $handle The style's registered handle. 277 * @param bool $echo Optional. Whether to echo the inline style instead of just returning it. 278 * Default true. 279 * @return string|bool False if no data exists, inline styles if `$echo` is true, true otherwise. 263 280 */ 264 281 public function print_inline_style( $handle, $echo = true ) { … … 281 298 282 299 /** 283 * 284 * @since 2.6.0 285 * @access public 286 * 287 * @param mixed $handles 288 * @param bool $recursion 289 * @param mixed $group 290 * @return bool 300 * Determines style dependencies. 301 * 302 * @since 2.6.0 303 * @access public 304 * 305 * @see WP_Dependencies::all_deps() 306 * 307 * @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings). 308 * @param bool $recursion Internal flag that function is calling itself. 309 * @param int|false $group Group level: (int) level, (false) no groups. 310 * @return bool True on success, false on failure. 291 311 */ 292 312 public function all_deps( $handles, $recursion = false, $group = false ) { 293 313 $r = parent::all_deps( $handles, $recursion ); 294 if ( ! $recursion ) {314 if ( ! $recursion ) { 295 315 /** 296 316 * Filter the array of enqueued styles before processing for output. … … 306 326 307 327 /** 308 * 309 * @since 2.6.0 310 * @access public 311 * 312 * @param string $src 313 * @param string $ver 314 * @param string $handle 315 * @return string 328 * Generates an enqueued style's fully-qualified URL. 329 * 330 * @since 2.6.0 331 * @access public 332 * 333 * @param string $src The source of the enqueued style. 334 * @param string $ver The version of the enqueued style. 335 * @param string $handle The style's registered handle. 336 * @return string Style's fully-qualified URL. 316 337 */ 317 338 public function _css_href( $src, $ver, $handle ) { … … 336 357 337 358 /** 338 * 339 * @since 2.8.0 340 * @access public 341 * 342 * @param string $src 343 * @return bool 359 * Whether a handle's source is in a default directory. 360 * 361 * @since 2.8.0 362 * @access public 363 * 364 * @param string $src The source of the enqueued style. 365 * @return bool True if found, false if not. 344 366 */ 345 367 public function in_default_dir( $src ) { … … 355 377 356 378 /** 379 * Processes items and dependencies for the footer group. 357 380 * 358 381 * HTML 5 allows styles in the body, grab late enqueued items and output them in the footer. … … 361 384 * @access public 362 385 * 363 * @return array 386 * @see WP_Dependencies::do_items() 387 * 388 * @return array Handles of items that have been processed. 364 389 */ 365 390 public function do_footer_items() { … … 369 394 370 395 /** 396 * Resets class properties. 371 397 * 372 398 * @since 3.3.0
Note: See TracChangeset
for help on using the changeset viewer.