wp_add_dashboard_widget


wp_add_dashboard_widget ( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null )

Parameters:
  • (string) $widget_id Widget ID (used in the 'id' attribute for the widget).
  • (string) $widget_name Title of the widget.
  • (callable) $callback Function that fills the widget with the desired content. The function should echo its output.
  • (callable) $control_callback Optional. Function that outputs controls for the widget. Default null.
  • (array) $callback_args Optional. Data that should be set as the $args property of the widget array (which is the second parameter passed to your callback). Default null.
Defined at:

Description

Adds a new dashboard widget.

Related Functions

wp_ajax_dashboard_widgets, add_dashboard_page, wp_dashboard_empty, wp_dashboard_setup, wp_dashboard_cached_rss_widget

Top Google Results

User discussions

wpseek mobile