A WordPress-centric search engine for devs and theme authors

wp-includes/widgets.php › WordPress File

Core Widgets API

Function Short description
dynamic_sidebarDisplay dynamic sidebar.
is_active_sidebarDetermines whether a sidebar contains widgets.
is_active_widgetDetermines whether a given widget is displayed on the front end.
is_dynamic_sidebarDetermines whether the dynamic sidebar is enabled and used by the theme.
is_registered_sidebarChecks if a sidebar is registered.
register_sidebarBuilds the definition for a single sidebar and returns the ID.
register_sidebarsCreates multiple sidebars.
register_widgetRegister a widget
retrieve_widgetsValidates 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.
the_widgetOutput an arbitrary widget as a template tag.
unregister_sidebarRemoves a sidebar from the list.
unregister_widgetUnregisters a widget.
wp_assign_widget_to_sidebarAssigns a widget to the given sidebar.
wp_check_widget_editor_depsDisplays a _doing_it_wrong() message for conflicting widget editor scripts.
wp_convert_widget_settingsConverts the widget settings from single to multi-widget format.
wp_find_widgets_sidebarFinds the sidebar that a given widget belongs to.
wp_get_sidebarRetrieves the registered sidebar with the given ID.
wp_get_sidebars_widgetsRetrieve full list of sidebars and their widget instance IDs.
wp_get_widget_defaultsRetrieve default registered sidebars list.
wp_map_sidebars_widgetsCompares a list of sidebars with their widgets against an allowed list.
wp_parse_widget_idConverts a widget ID into its id_base and number components.
wp_register_sidebar_widgetRegister an instance of a widget.
wp_register_widget_controlRegisters widget control callback for customizing options.
wp_render_widgetCalls the render callback of a widget and returns the output.
wp_render_widget_controlCalls the control callback of a widget and returns the output.
wp_setup_widgets_block_editorEnables 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.
wp_set_sidebars_widgetsSet the sidebar widget option to update sidebars.
wp_sidebar_descriptionRetrieve description for a sidebar.
wp_unregister_sidebar_widgetRemove widget from sidebar.
wp_unregister_widget_controlRemove control callback for widget.
wp_use_widgets_block_editorWhether 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.
wp_widgets_initRegisters all of the default WordPress widgets on startup.
wp_widget_descriptionRetrieve description for widget.
wp_widget_rss_formDisplay RSS widget options form.
wp_widget_rss_outputDisplay the RSS entries in a list.
wp_widget_rss_processProcess RSS feed widget data and optionally retrieve feed items.
_get_widget_id_baseRetrieves the widget ID base value.
_register_widget_form_callbackRegisters the form callback for a widget.
_register_widget_update_callbackRegisters the update callback for a widget.
_wp_block_theme_register_classic_sidebarsRegisters the previous theme's sidebars for the block themes.
_wp_remove_unregistered_widgetsCompares a list of sidebars with their widgets against an allowed list.
_wp_sidebars_changedHandle sidebars config after theme change