@@ -392,6 +392,8 @@ function is_registered_sidebar( $sidebar_id ) {
392392 * Only available for WP_Widget based widgets.
393393 * }
394394 * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
395+ *
396+ * @phpstan-param string|callable|callable-string $output_callback
395397 */
396398function wp_register_sidebar_widget ( $ id , $ name , $ output_callback , $ options = array (), ...$ params ) {
397399 global $ wp_registered_widgets , $ wp_registered_widget_controls , $ wp_registered_widget_updates , $ _wp_deprecated_widgets_callbacks ;
@@ -532,6 +534,8 @@ function wp_unregister_sidebar_widget( $id ) {
532534 * text widget. The widget ID will end up looking like `{$id_base}-{$unique_number}`.
533535 * }
534536 * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
537+ *
538+ * @phpstan-param string|callable|callable-string $control_callback
535539 */
536540function wp_register_widget_control ( $ id , $ name , $ control_callback , $ options = array (), ...$ params ) {
537541 global $ wp_registered_widget_controls , $ wp_registered_widget_updates , $ wp_registered_widgets , $ _wp_deprecated_widgets_callbacks ;
@@ -598,6 +602,8 @@ function wp_register_widget_control( $id, $name, $control_callback, $options = a
598602 * @param array $options Optional. Widget control options. See wp_register_widget_control().
599603 * Default empty array.
600604 * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
605+ *
606+ * @phpstan-param string|callable|callable-string $update_callback
601607 */
602608function _register_widget_update_callback ( $ id_base , $ update_callback , $ options = array (), ...$ params ) {
603609 global $ wp_registered_widget_updates ;
@@ -633,8 +639,9 @@ function _register_widget_update_callback( $id_base, $update_callback, $options
633639 * @param array $options Optional. Widget control options. See wp_register_widget_control().
634640 * Default empty array.
635641 * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
642+ *
643+ * @phpstan-param string|callable|callable-string $form_callback
636644 */
637-
638645function _register_widget_form_callback ( $ id , $ name , $ form_callback , $ options = array (), ...$ params ) {
639646 global $ wp_registered_widget_controls ;
640647
0 commit comments