~canonical-sysadmins/wordpress/4.7

« back to all changes in this revision

Viewing changes to wp-includes/functions.wp-scripts.php

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:04:26 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: nick.moffitt@canonical.com-20150115110426-5stm1p14cfnxrtme
New Upstream Version 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 *
22
22
 * @since 2.6.0
23
23
 *
24
 
 * @param array|bool $handles Optional. Scripts to be printed. Default 'false'.
 
24
 * @param string|bool|array $handles Optional. Scripts to be printed. Default 'false'.
25
25
 * @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array.
26
26
 */
27
27
function wp_print_scripts( $handles = false ) {
90
90
 * Works only if the script has already been added.
91
91
 *
92
92
 * Accepts an associative array $l10n and creates a JavaScript object:
93
 
 * <code>
94
 
 * "$object_name" = {
95
 
 *       key: value,
96
 
 *       key: value,
97
 
 *       ...
98
 
 * }
99
 
 * </code>
 
93
 *
 
94
 *     "$object_name" = {
 
95
 *         key: value,
 
96
 *         key: value,
 
97
 *         ...
 
98
 *     }
 
99
 *
100
100
 *
101
101
 * @see WP_Dependencies::localize()
102
 
 * @link http://core.trac.wordpress.org/ticket/11520
 
102
 * @link https://core.trac.wordpress.org/ticket/11520
103
103
 * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
104
104
 *
105
105
 * @since 2.6.0
106
106
 *
 
107
 * @todo Documentation cleanup
 
108
 *
107
109
 * @param string $handle      Script handle the data will be attached to.
108
110
 * @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.
109
111
 *                            Example: '/[a-zA-Z0-9_]+/'.