WP_Widget_Text::_register()

Add hooks for enqueueing assets when registering all widget instances of this widget class.


Description Description


Source Source

File: wp-includes/widgets/class-wp-widget-text.php

	public function _register() {

		// Note that the widgets component in the customizer will also do the 'admin_print_scripts-widgets.php' action in WP_Customize_Widgets::print_scripts().
		add_action( 'admin_print_scripts-widgets.php', array( $this, 'enqueue_admin_scripts' ) );

		// Note that the widgets component in the customizer will also do the 'admin_footer-widgets.php' action in WP_Customize_Widgets::print_footer_scripts().
		add_action( 'admin_footer-widgets.php', array( $this, 'render_control_template_scripts' ) );

		parent::_register();
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.8.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.