33 * Core Widgets API
44 *
55 * This API is used for creating dynamic sidebar without hardcoding functionality into
6- * themes
6+ * themes.
77 *
88 * Includes both internal WordPress routines and theme-use routines.
99 *
103103//
104104
105105/**
106- * Register a widget
106+ * Registers a widget.
107107 *
108108 * Registers a WP_Widget widget
109109 *
@@ -226,7 +226,7 @@ function register_sidebars( $number = 1, $args = array() ) {
226226 * on what other plugins and themes are installed.
227227 *
228228 * If theme support for 'widgets' has not yet been added when this function is
229- * called, it will be automatically enabled through the use of add_theme_support()
229+ * called, it will be automatically enabled through the use of add_theme_support().
230230 *
231231 * @since 2.2.0
232232 * @since 5.6.0 Added the `before_sidebar` and `after_sidebar` arguments.
@@ -361,7 +361,7 @@ function is_registered_sidebar( $sidebar_id ) {
361361}
362362
363363/**
364- * Register an instance of a widget.
364+ * Registers an instance of a widget.
365365 *
366366 * The default widget option is 'classname' that can be overridden.
367367 *
@@ -435,7 +435,7 @@ function wp_register_sidebar_widget( $id, $name, $output_callback, $options = ar
435435}
436436
437437/**
438- * Retrieve description for widget.
438+ * Retrieves description for widget.
439439 *
440440 * When registering widgets, the options can also include 'description' that
441441 * describes the widget for display on the widget administration panel or
@@ -461,7 +461,7 @@ function wp_widget_description( $id ) {
461461}
462462
463463/**
464- * Retrieve description for a sidebar.
464+ * Retrieves description for a sidebar.
465465 *
466466 * When registering sidebars a 'description' parameter can be included that
467467 * describes the sidebar for display on the widget administration panel.
@@ -669,7 +669,7 @@ function _register_widget_form_callback( $id, $name, $form_callback, $options =
669669}
670670
671671/**
672- * Remove control callback for widget.
672+ * Removes control callback for widget.
673673 *
674674 * @since 2.2.0
675675 *
@@ -680,7 +680,7 @@ function wp_unregister_widget_control( $id ) {
680680}
681681
682682/**
683- * Display dynamic sidebar.
683+ * Displays dynamic sidebar.
684684 *
685685 * By default this displays the default sidebar or 'sidebar-1'. If your theme specifies the 'id' or
686686 * 'name' parameter for its registered sidebars you can pass an ID or name as the $index parameter.
@@ -883,8 +883,8 @@ function dynamic_sidebar( $index = 1 ) {
883883/**
884884 * Determines whether a given widget is displayed on the front end.
885885 *
886- * Either $callback or $id_base can be used
887- * $id_base is the first argument when extending WP_Widget class
886+ * Either $callback or $id_base can be used.
887+ * $id_base is the first argument when extending WP_Widget class.
888888 * Without the optional $widget_id parameter, returns the ID of the first sidebar
889889 * in which the first instance of the widget with the given callback or $id_base is found.
890890 * With the $widget_id parameter, returns the ID of the sidebar where
@@ -1002,7 +1002,7 @@ function is_active_sidebar( $index ) {
10021002//
10031003
10041004/**
1005- * Retrieve full list of sidebars and their widget instance IDs.
1005+ * Retrieves the full list of sidebars and their widget instance IDs.
10061006 *
10071007 * Will upgrade sidebar widget list, if needed. Will also save updated list, if
10081008 * needed.
@@ -1081,7 +1081,7 @@ function wp_get_sidebar( $id ) {
10811081}
10821082
10831083/**
1084- * Set the sidebar widget option to update sidebars.
1084+ * Sets the sidebar widget option to update sidebars.
10851085 *
10861086 * @since 2.2.0
10871087 * @access private
@@ -1103,7 +1103,7 @@ function wp_set_sidebars_widgets( $sidebars_widgets ) {
11031103}
11041104
11051105/**
1106- * Retrieve default registered sidebars list.
1106+ * Retrieves default registered sidebars list.
11071107 *
11081108 * @since 2.2.0
11091109 * @access private
@@ -1194,7 +1194,7 @@ function wp_convert_widget_settings( $base_name, $option_name, $settings ) {
11941194}
11951195
11961196/**
1197- * Output an arbitrary widget as a template tag.
1197+ * Outputs an arbitrary widget as a template tag.
11981198 *
11991199 * @since 2.8.0
12001200 *
@@ -1282,7 +1282,7 @@ function _get_widget_id_base( $id ) {
12821282}
12831283
12841284/**
1285- * Handle sidebars config after theme change
1285+ * Handles sidebars config after theme change.
12861286 *
12871287 * @access private
12881288 * @since 3.3.0
@@ -1575,7 +1575,7 @@ function _wp_remove_unregistered_widgets( $sidebars_widgets, $allowed_widget_ids
15751575}
15761576
15771577/**
1578- * Display the RSS entries in a list.
1578+ * Displays the RSS entries in a list.
15791579 *
15801580 * @since 2.5.0
15811581 *
@@ -1682,7 +1682,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
16821682}
16831683
16841684/**
1685- * Display RSS widget options form.
1685+ * Displays RSS widget options form.
16861686 *
16871687 * The options for what fields are displayed for the RSS form are all booleans
16881688 * and are as follows: 'url', 'title', 'items', 'show_summary', 'show_author',
@@ -1763,7 +1763,7 @@ function wp_widget_rss_form( $args, $inputs = null ) {
17631763}
17641764
17651765/**
1766- * Process RSS feed widget data and optionally retrieve feed items.
1766+ * Processes RSS feed widget data and optionally retrieve feed items.
17671767 *
17681768 * The feed widget can not have more than 20 items or it will reset back to the
17691769 * default, which is 10.
@@ -1883,9 +1883,9 @@ function wp_setup_widgets_block_editor() {
18831883}
18841884
18851885/**
1886- * Whether or not to use the block editor to manage widgets. Defaults to true
1887- * unless a theme has removed support for widgets-block-editor or a plugin has
1888- * filtered the return value of this function.
1886+ * Determines whether or not to use the block editor to manage widgets.
1887+ * Defaults to true unless a theme has removed support for widgets-block-editor
1888+ * or a plugin has filtered the return value of this function.
18891889 *
18901890 * @since 5.8.0
18911891 *
0 commit comments