diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index 8edf4ee49b..aebf3a3b59 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -190,20 +190,20 @@ class WP_Scripts extends WP_Dependencies { * Prints extra scripts of a registered script. * * @since 2.1.0 - * @since 2.8.0 Added the `$echo` parameter. + * @since 2.8.0 Added the `$display` parameter. * @deprecated 3.3.0 * * @see print_extra_script() * - * @param string $handle The script's registered handle. - * @param bool $echo Optional. Whether to echo the extra script - * instead of just returning it. Default true. - * @return bool|string|void Void if no data exists, extra scripts if `$echo` is true, + * @param string $handle The script's registered handle. + * @param bool $display Optional. Whether to print the extra script + * instead of just returning it. Default true. + * @return bool|string|void Void if no data exists, extra scripts if `$display` is true, * true otherwise. */ - public function print_scripts_l10n( $handle, $echo = true ) { + public function print_scripts_l10n( $handle, $display = true ) { _deprecated_function( __FUNCTION__, '3.3.0', 'WP_Scripts::print_extra_script()' ); - return $this->print_extra_script( $handle, $echo ); + return $this->print_extra_script( $handle, $display ); } /** @@ -211,19 +211,19 @@ class WP_Scripts extends WP_Dependencies { * * @since 3.3.0 * - * @param string $handle The script's registered handle. - * @param bool $echo Optional. Whether to echo the extra script - * instead of just returning it. Default true. - * @return bool|string|void Void if no data exists, extra scripts if `$echo` is true, + * @param string $handle The script's registered handle. + * @param bool $display Optional. Whether to print the extra script + * instead of just returning it. Default true. + * @return bool|string|void Void if no data exists, extra scripts if `$display` is true, * true otherwise. */ - public function print_extra_script( $handle, $echo = true ) { + public function print_extra_script( $handle, $display = true ) { $output = $this->get_data( $handle, 'data' ); if ( ! $output ) { return; } - if ( ! $echo ) { + if ( ! $display ) { return $output; } @@ -444,11 +444,11 @@ class WP_Scripts extends WP_Dependencies { * Must be lowercase. * @param string $position Optional. Whether to add the inline script * before the handle or after. Default 'after'. - * @param bool $echo Optional. Whether to echo the script + * @param bool $display Optional. Whether to print the script * instead of just returning it. Default true. * @return string|false Script on success, false otherwise. */ - public function print_inline_script( $handle, $position = 'after', $echo = true ) { + public function print_inline_script( $handle, $position = 'after', $display = true ) { $output = $this->get_data( $handle, $position ); if ( empty( $output ) ) { @@ -457,7 +457,7 @@ class WP_Scripts extends WP_Dependencies { $output = trim( implode( "\n", $output ), "\n" ); - if ( $echo ) { + if ( $display ) { printf( "\n%s\n\n", $this->type_attr, esc_attr( $handle ), esc_attr( $position ), $output ); } @@ -582,13 +582,13 @@ class WP_Scripts extends WP_Dependencies { * * @since 5.0.0 * - * @param string $handle Name of the script to add the inline script to. - * Must be lowercase. - * @param bool $echo Optional. Whether to echo the script - * instead of just returning it. Default true. + * @param string $handle Name of the script to add the inline script to. + * Must be lowercase. + * @param bool $display Optional. Whether to print the script + * instead of just returning it. Default true. * @return string|false Script on success, false otherwise. */ - public function print_translations( $handle, $echo = true ) { + public function print_translations( $handle, $display = true ) { if ( ! isset( $this->registered[ $handle ] ) || empty( $this->registered[ $handle ]->textdomain ) ) { return false; } @@ -610,7 +610,7 @@ class WP_Scripts extends WP_Dependencies { } )( "{$domain}", {$json_translations} ); JS; - if ( $echo ) { + if ( $display ) { printf( "\n%s\n\n", $this->type_attr, esc_attr( $handle ), $output ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 875b1a2004..ecd931ac3e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta2-53282'; +$wp_version = '6.0-beta2-53283'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.