WordPress at a glance
function is not described

WP_Widget_Custom_HTML::enqueue_admin_scripts() public WP 4.9.0

Loads the required scripts and styles for the widget control.

{} It's a method of the class: WP_Widget_Custom_HTML{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Widget_Custom_HTML = new WP_Widget_Custom_HTML();
$WP_Widget_Custom_HTML->enqueue_admin_scripts();

Changelog

Since 4.9.0 Introduced.

Code of WP_Widget_Custom_HTML::enqueue_admin_scripts() WP 5.7.2

<?php
public function enqueue_admin_scripts() {
	$settings = wp_enqueue_code_editor(
		array(
			'type'       => 'text/html',
			'codemirror' => array(
				'indentUnit' => 2,
				'tabSize'    => 2,
			),
		)
	);

	wp_enqueue_script( 'custom-html-widgets' );
	if ( empty( $settings ) ) {
		$settings = array(
			'disabled' => true,
		);
	}
	wp_add_inline_script( 'custom-html-widgets', sprintf( 'wp.customHtmlWidgets.init( %s );', wp_json_encode( $settings ) ), 'after' );

	$l10n = array(
		'errorNotice' => array(
			/* translators: %d: Error count. */
			'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ),
			/* translators: %d: Error count. */
			'plural'   => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ),
			// @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491.
		),
	);
	wp_add_inline_script( 'custom-html-widgets', sprintf( 'jQuery.extend( wp.customHtmlWidgets.l10n, %s );', wp_json_encode( $l10n ) ), 'after' );
}