WordPress action hook · part of WordPress core
admin_print_scripts-widgets.php
A WordPress core action that 11 plugins also fire themselves, running on 11.5M+ sites between them.
“This action is documented in wp-admin/admin-header.php”
How to use admin_print_scripts-widgets.php
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'admin_print_scripts-widgets.php', function() {
// Your code runs here.
}, 10, 1 );Argument names come from Elementor Agent Ready Website Builder's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
11 plugins that fire admin_print_scripts-widgets.php
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Elementor Agent Ready Website Builder10+ million installs
do_action( 'admin_print_scripts-widgets.php' )includes/managers/wordpress-widgets.php:70 -
Website Builder by SeedProd600,000+ installs
do_action( 'admin_print_scripts-widgets.php' )app/bootstrap.php:436 -
The Events Calendar600,000+ installs
do_action( 'admin_print_scripts-widgets.php' )src/Tribe/Editor/Hooks.php:86 -
Max Mega Menu300,000+ installs
do_action( 'admin_print_scripts-widgets.php' )megamenu.php:237 -
QuadMenu10,000+ installs
do_action( 'admin_print_scripts-widgets.php' )lib/backend/walker/class-nav-menu-widgets.php:447 -
WP Mega Menu8,000+ installs
do_action( 'admin_print_scripts-widgets.php' )classes/class.wp-megamenu-base.php:169 -
Themify Builder6,000+ installs
do_action( 'admin_print_scripts-widgets.php' )themify/megamenu/class-mega-menu.php:650 -
Easy Mega Menu for WordPress1,000+ installs
do_action( 'admin_print_scripts-widgets.php' )inc/megamenu-base.php:22 -
X3P0 Legacy Widget200+ installs
do_action( 'admin_print_scripts-widgets.php' )src/Plugin.php:113 -
Legacy Widgets in Block EditorFewer than 10 installs
do_action( 'admin_print_scripts-widgets.php' )legacy-widgets-in-block-editor.php:42 -
Mega NavifyFewer than 10 installs
do_action( 'admin_print_scripts-widgets.php' )includes/class-meganavify-scripts.php:120
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.