mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
Docs: Correct and improve inline docs for parameters that accept a callback function.
See #49572 git-svn-id: https://develop.svn.wordpress.org/trunk@48473 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -787,16 +787,16 @@ function dynamic_sidebar( $index = 1 ) {
|
||||
* @param array $widget_id {
|
||||
* An associative array of widget arguments.
|
||||
*
|
||||
* @type string $name Name of the widget.
|
||||
* @type string $id Widget ID.
|
||||
* @type array|callable $callback When the hook is fired on the front end, $callback is an array
|
||||
* containing the widget object. Fired on the back end, $callback
|
||||
* is 'wp_widget_control', see $_callback.
|
||||
* @type array $params An associative array of multi-widget arguments.
|
||||
* @type string $classname CSS class applied to the widget container.
|
||||
* @type string $description The widget description.
|
||||
* @type array $_callback When the hook is fired on the back end, $_callback is populated
|
||||
* with an array containing the widget object, see $callback.
|
||||
* @type string $name Name of the widget.
|
||||
* @type string $id Widget ID.
|
||||
* @type callable $callback When the hook is fired on the front end, $callback is an array
|
||||
* containing the widget object. Fired on the back end, $callback
|
||||
* is 'wp_widget_control', see $_callback.
|
||||
* @type array $params An associative array of multi-widget arguments.
|
||||
* @type string $classname CSS class applied to the widget container.
|
||||
* @type string $description The widget description.
|
||||
* @type array $_callback When the hook is fired on the back end, $_callback is populated
|
||||
* with an array containing the widget object, see $callback.
|
||||
* }
|
||||
*/
|
||||
do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] );
|
||||
@@ -857,10 +857,10 @@ function dynamic_sidebar( $index = 1 ) {
|
||||
*
|
||||
* @global array $wp_registered_widgets
|
||||
*
|
||||
* @param string|false $callback Optional, Widget callback to check. Default false.
|
||||
* @param int|false $widget_id Optional. Widget ID. Optional, but needed for checking. Default false.
|
||||
* @param string|false $id_base Optional. The base ID of a widget created by extending WP_Widget. Default false.
|
||||
* @param bool $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. Default true.
|
||||
* @param callable|false $callback Optional, Widget callback to check. Default false.
|
||||
* @param int|false $widget_id Optional. Widget ID. Optional, but needed for checking. Default false.
|
||||
* @param string|false $id_base Optional. The base ID of a widget created by extending WP_Widget. Default false.
|
||||
* @param bool $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. Default true.
|
||||
* @return string|false False if widget is not active or id of sidebar in which the widget is active.
|
||||
*/
|
||||
function is_active_widget( $callback = false, $widget_id = false, $id_base = false, $skip_inactive = true ) {
|
||||
|
||||
Reference in New Issue
Block a user