From 0d05b99e1b23c86612eda8dbe4adf26f92413907 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 28 Sep 2018 21:51:24 +0000 Subject: [PATCH] Docs: Document that the `$src` parameter of `WP_Dependencies::add()` can be boolean. Props dimadin. Fixes #45009. Built from https://develop.svn.wordpress.org/trunk@43661 git-svn-id: http://core.svn.wordpress.org/trunk@43490 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class.wp-dependencies.php | 3 ++- wp-includes/functions.wp-scripts.php | 3 ++- wp-includes/functions.wp-styles.php | 3 ++- wp-includes/version.php | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/wp-includes/class.wp-dependencies.php b/wp-includes/class.wp-dependencies.php index b5683cb95e..081ced907b 100644 --- a/wp-includes/class.wp-dependencies.php +++ b/wp-includes/class.wp-dependencies.php @@ -202,7 +202,8 @@ class WP_Dependencies { * @since 2.6.0 Moved from `WP_Scripts`. * * @param string $handle Name of the item. Should be unique. - * @param string $src Full URL of the item, or path of the item relative to the WordPress root directory. + * @param string|bool $src Full URL of the item, or path of the item relative to the WordPress root directory. + * If source is set to false, item is an alias of other items it depends on. * @param string[] $deps Optional. An array of registered item handles this item depends on. Default empty array. * @param string|bool|null $ver Optional. String specifying item version number, if it has one, which is added to the URL * as a query string for cache busting purposes. If version is set to false, a version diff --git a/wp-includes/functions.wp-scripts.php b/wp-includes/functions.wp-scripts.php index 5d9062aeef..3fdf33974c 100644 --- a/wp-includes/functions.wp-scripts.php +++ b/wp-includes/functions.wp-scripts.php @@ -140,7 +140,8 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) { * @since 4.3.0 A return value was added. * * @param string $handle Name of the script. Should be unique. - * @param string $src Full URL of the script, or path of the script relative to the WordPress root directory. + * @param string|bool $src Full URL of the script, or path of the script relative to the WordPress root directory. + * If source is set to false, script is an alias of other scripts it depends on. * @param array $deps Optional. An array of registered script handles this script depends on. Default empty array. * @param string|bool|null $ver Optional. String specifying script version number, if it has one, which is added to the URL * as a query string for cache busting purposes. If version is set to false, a version diff --git a/wp-includes/functions.wp-styles.php b/wp-includes/functions.wp-styles.php index ec791747c3..20acd58e9a 100644 --- a/wp-includes/functions.wp-styles.php +++ b/wp-includes/functions.wp-styles.php @@ -110,7 +110,8 @@ function wp_add_inline_style( $handle, $data ) { * @since 4.3.0 A return value was added. * * @param string $handle Name of the stylesheet. Should be unique. - * @param string $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory. + * @param string|bool $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory. + * If source is set to false, stylesheet is an alias of other stylesheets it depends on. * @param array $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array. * @param string|bool|null $ver Optional. String specifying stylesheet version number, if it has one, which is added to the URL * as a query string for cache busting purposes. If version is set to false, a version diff --git a/wp-includes/version.php b/wp-includes/version.php index 23ba740fd0..66bac8cd5e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43660'; +$wp_version = '5.0-alpha-43661'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.