Changeset 36744 for trunk/src/wp-includes/class.wp-scripts.php
- Timestamp:
- 02/27/2016 08:33:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class.wp-scripts.php
r36730 r36744 1 1 <?php 2 2 /** 3 * BackPress Scripts enqueue.3 * Dependencies API: WP_Scripts 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 r167 * @package WordPress 8 * @subpackage Dependencies 10 9 */ 11 10 12 11 /** 13 * BackPress Scripts enqueue class.12 * Core class used to register scripts. 14 13 * 15 * @package BackPress14 * @package WordPress 16 15 * @uses WP_Dependencies 17 * @since r1616 * @since 2.1.0 18 17 */ 19 18 class WP_Scripts 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 * Holds handles of scripts which are enqueued in footer. 48 50 * 49 51 * @since 2.8.0 … … 54 56 55 57 /** 58 * Holds a list of script 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 script 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 scripts and additional data if concatenation 87 * is enabled. 80 88 * 81 89 * @since 2.8.0 … … 94 102 95 103 /** 104 * Holds inline code if concatenation is enabled. 96 105 * 97 106 * @since 2.8.0 … … 102 111 103 112 /** 113 * Holds a list of script handles which are not in the default directory 114 * if concatenation is enabled. 115 * 116 * Unused in core. 104 117 * 105 118 * @since 2.8.0 … … 110 123 111 124 /** 125 * Holds a string which contains handles and versions of scripts which 126 * are not in the default directory if concatenation is enabled. 127 * 128 * Unused in core. 112 129 * 113 130 * @since 2.8.0 … … 118 135 119 136 /** 137 * List of default directories. 120 138 * 121 139 * @since 2.8.0 … … 173 191 174 192 /** 193 * Prints extra scripts of a registered script. 175 194 * 176 195 * @since 2.1.0 … … 181 200 * @see print_extra_script() 182 201 * 183 * @param string $handle 184 * @param bool $echo 185 * @return bool|string|void 202 * @param string $handle The script's registered handle. 203 * @param bool $echo Optional. Whether to echo the extra script instead of just returning it. 204 * Default true. 205 * @return bool|string|void Void if no data exists, extra scripts if `$echo` is true, true otherwise. 186 206 */ 187 207 public function print_scripts_l10n( $handle, $echo = true ) { … … 191 211 192 212 /** 213 * Prints extra scripts of a registered script. 193 214 * 194 215 * @since 3.3.0 195 216 * @access public 196 217 * 197 * @param string $handle 198 * @param bool $echo 199 * @return bool|string|void 218 * @param string $handle The script's registered handle. 219 * @param bool $echo Optional. Whether to echo the extra script instead of just returning it. 220 * Default true. 221 * @return bool|string|void Void if no data exists, extra scripts if `$echo` is true, true otherwise. 200 222 */ 201 223 public function print_extra_script( $handle, $echo = true ) { … … 216 238 217 239 /** 240 * Processes a script dependency. 218 241 * 219 242 * @since 2.6.0 … … 221 244 * @access public 222 245 * 223 * @param string $handle Name of the item. Should be unique. 224 * @param int|bool $group 225 * @return bool True on success, false if not set. 246 * @see WP_Dependencies::do_item() 247 * 248 * @param string $handle The script's registered handle. 249 * @param int|false $group Optional. Group level: (int) level, (false) no groups. Default false. 250 * @return bool True on success, false on failure. 226 251 */ 227 252 public function do_item( $handle, $group = false ) { … … 407 432 408 433 /** 409 * Localizes a script, only if the script has already been added 434 * Localizes a script, only if the script has already been added. 410 435 * 411 436 * @since 2.1.0 … … 447 472 448 473 /** 449 * 450 * @since 2.8.0 451 * @access public 452 * 453 * @param string $handle Name of the item. Should be unique. 454 * @param bool $recursion Internal flag that calling function was called recursively. 455 * @param mixed $group Group level. 474 * Sets handle group. 475 * 476 * @since 2.8.0 477 * @access public 478 * 479 * @see WP_Dependencies::set_group() 480 * 481 * @param string $handle Name of the item. Should be unique. 482 * @param bool $recursion Internal flag that calling function was called recursively. 483 * @param int|false $group Optional. Group level: (int) level, (false) no groups. Default false. 456 484 * @return bool Not already in the group or a lower group 457 485 */ … … 469 497 470 498 /** 471 * 499 * Determines script dependencies. 500 * 472 501 * @since 2.1.0 473 502 * @access public 474 503 * 475 * @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings). 476 * @param bool $recursion Internal flag that function is calling itself. 477 * @param mixed $group Group level: (int) level, (false) no groups. 504 * @see WP_Dependencies::all_deps() 505 * 506 * @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings). 507 * @param bool $recursion Internal flag that function is calling itself. 508 * @param int|false $group Optional. Group level: (int) level, (false) no groups. Default false. 478 509 * @return bool True on success, false on failure. 479 510 */ … … 494 525 495 526 /** 496 * 497 * @since 2.8.0 498 * @access public 499 * 500 * @return array 527 * Processes items and dependencies for the head group. 528 * 529 * @since 2.8.0 530 * @access public 531 * 532 * @see WP_Dependencies::do_items() 533 * 534 * @return array Handles of items that have been processed. 501 535 */ 502 536 public function do_head_items() { … … 506 540 507 541 /** 508 * 509 * @since 2.8.0 510 * @access public 511 * 512 * @return array 542 * Processes items and dependencies for the footer group. 543 * 544 * @since 2.8.0 545 * @access public 546 * 547 * @see WP_Dependencies::do_items() 548 * 549 * @return array Handles of items that have been processed. 513 550 */ 514 551 public function do_footer_items() { … … 518 555 519 556 /** 520 * 521 * @since 2.8.0 522 * @access public 523 * 524 * @param string $src 525 * @return bool 557 * Whether a handle's source is in a default directory. 558 * 559 * @since 2.8.0 560 * @access public 561 * 562 * @param string $src The source of the enqueued script. 563 * @return bool True if found, false if not. 526 564 */ 527 565 public function in_default_dir( $src ) { … … 543 581 544 582 /** 583 * Resets class properties. 545 584 * 546 585 * @since 2.8.0
Note: See TracChangeset
for help on using the changeset viewer.