Warning: This method has been deprecated. Use print_extra_script() instead.

WP_Scripts::print_scripts_l10n() WordPress Method

The WP_Scripts::print_scripts_l10n() function allows you to print your WordPress scripts in a localized manner. This function will first check if a script has already been printed and if so, will not print it again.

WP_Scripts::print_scripts_l10n( string $handle, bool $display = true ) #

Prints extra scripts of a registered script.


Description

Top ↑

See also


Top ↑

Parameters

$handle

(string)(Required)The script's registered handle.

$display

(bool)(Optional) Whether to print the extra script instead of just returning it.

Default value: true


Top ↑

Return

(bool|string|void) Void if no data exists, extra scripts if $display is true, true otherwise.


Top ↑

Source

File: wp-includes/class.wp-scripts.php

	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, $display );
	}


Top ↑

Changelog

Changelog
VersionDescription
3.3.0This method has been deprecated. Use print_extra_script() instead.
2.8.0Added the $display parameter.
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.