File: wp-includes/widgets.php
-
Registers the previous theme’s sidebars for the block themes.
-
functionwp_get_sidebar()
Retrieves the registered sidebar with the given ID.
-
functionwp_check_widget_editor_deps()
Displays a _doing_it_wrong() message for conflicting widget editor scripts.
-
functionwp_find_widgets_sidebar()
Finds the sidebar that a given widget belongs to.
-
functionwp_assign_widget_to_sidebar()
Assigns a widget to the given sidebar.
-
functionwp_render_widget()
Calls the render callback of a widget and returns the output.
-
functionwp_render_widget_control()
Calls the control callback of a widget and returns the output.
-
functionwp_setup_widgets_block_editor()
Enables the widgets block editor. This is hooked into ‘after_setup_theme’ so that the block editor is enabled by default but can be disabled by themes.
-
functionwp_use_widgets_block_editor()
Whether or not to use the block editor to manage widgets. Defaults to true unless a theme has removed support for widgets-block-editor or a plugin has filtered the return value of this function.
-
Filters whether to use the block editor to manage widgets.
-
functionwp_parse_widget_id()
Converts a widget ID into its id_base and number components.
-
Filters the sidebar default arguments.
-
Compares a list of sidebars with their widgets against an allowed list.
-
functionwp_map_sidebars_widgets()
Compares a list of sidebars with their widgets against an allowed list.
-
functionis_registered_sidebar()
Checks if a sidebar is registered.
-
hookwidgets_init
Fires after all default WordPress widgets have been registered.
-
functionwp_widget_rss_output()
Display the RSS entries in a list.
-
functionwp_widget_rss_form()
Display RSS widget options form.
-
functionwp_widget_rss_process()
Process RSS feed widget data and optionally retrieve feed items.
-
functionwp_widgets_init()
Registers all of the default WordPress widgets on startup.
-
function_wp_sidebars_changed()
Handle sidebars config after theme change
-
functionretrieve_widgets()
Validates and remaps any “orphaned” widgets to wp_inactive_widgets sidebar, and saves the widget settings. This has to run at least on each theme change.
-
Filters whether a sidebar has widgets.
-
hookthe_widget
Fires before rendering the requested widget.
-
functionis_active_widget()
Determines whether a given widget is displayed on the front end.
-
function_get_widget_id_base()
Retrieves the widget ID base value.
-
functionis_dynamic_sidebar()
Determines whether the dynamic sidebar is enabled and used by the theme.
-
functionis_active_sidebar()
Determines whether a sidebar contains widgets.
-
Filters whether a dynamic sidebar is considered “active”.
-
functionwp_unregister_widget_control()
Remove control callback for widget.