]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/functions.wp-scripts.php
WordPress 4.1.1-scripts
[autoinstalls/wordpress.git] / wp-includes / functions.wp-scripts.php
index e89553b1b8b5ae1da3189706e6f8a58d39e5bbfa..6eb7a44f899868b167b35dd8b5e259090eafcbaf 100644 (file)
  *
  * @since 2.6.0
  *
- * @param array|bool $handles Optional. Scripts to be printed. Default 'false'.
+ * @param string|bool|array $handles Optional. Scripts to be printed. Default 'false'.
  * @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array.
  */
 function wp_print_scripts( $handles = false ) {
+       /**
+        * Fires before scripts in the $handles queue are printed.
+        *
+        * @since 2.1.0
+        */
        do_action( 'wp_print_scripts' );
        if ( '' === $handles ) // for wp_head
                $handles = false;
@@ -85,20 +90,22 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_f
  * Works only if the script has already been added.
  *
  * Accepts an associative array $l10n and creates a JavaScript object:
- * <code>
- * "$object_name" = {
- *       key: value,
- *       key: value,
- *       ...
- * }
- * </code>
+ *
+ *     "$object_name" = {
+ *         key: value,
+ *         key: value,
+ *         ...
+ *     }
+ *
  *
  * @see WP_Dependencies::localize()
- * @link http://core.trac.wordpress.org/ticket/11520
+ * @link https://core.trac.wordpress.org/ticket/11520
  * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
  *
  * @since 2.6.0
  *
+ * @todo Documentation cleanup
+ *
  * @param string $handle      Script handle the data will be attached to.
  * @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.
  *                            Example: '/[a-zA-Z0-9_]+/'.