[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> dashboard.php (summary)

WordPress Dashboard Widget Administration Screen API

File Size: 2051 lines (66 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 30 functions

  wp_dashboard_setup()
  wp_add_dashboard_widget()
  _wp_dashboard_control_callback()
  wp_dashboard()
  wp_dashboard_right_now()
  wp_network_dashboard_right_now()
  wp_dashboard_quick_press()
  wp_dashboard_recent_drafts()
  _wp_dashboard_recent_comments_row()
  wp_dashboard_site_activity()
  wp_dashboard_recent_posts()
  wp_dashboard_recent_comments()
  wp_dashboard_rss_output()
  wp_dashboard_cached_rss_widget()
  wp_dashboard_trigger_widget_control()
  wp_dashboard_rss_control()
  wp_dashboard_events_news()
  wp_print_community_events_markup()
  wp_print_community_events_templates()
  wp_dashboard_primary()
  wp_dashboard_primary_output()
  wp_dashboard_quota()
  wp_dashboard_browser_nag()
  dashboard_browser_nag_class()
  wp_check_browser_version()
  wp_dashboard_php_nag()
  dashboard_php_nag_class()
  wp_dashboard_site_health()
  wp_dashboard_empty()
  wp_welcome_panel()

Functions
Functions that are not part of a class:

wp_dashboard_setup()   X-Ref
Registers dashboard widgets.

Handles POST data, sets up filters.

since: 2.5.0

wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null, $context = 'normal', $priority = 'core' )   X-Ref
Adds a new dashboard widget.

param: string   $widget_id        Widget ID  (used in the 'id' attribute for the widget).
param: string   $widget_name      Title of the widget.
param: callable $callback         Function that fills the widget with the desired content.
param: callable $control_callback Optional. Function that outputs controls for the widget. Default null.
param: array    $callback_args    Optional. Data that should be set as the $args property of the widget array
param: string   $context          Optional. The context within the screen where the box should display.
param: string   $priority         Optional. The priority within the context where the box should show.
since: 2.7.0
since: 5.6.0 The `$context` and `$priority` parameters were added.

_wp_dashboard_control_callback( $dashboard, $meta_box )   X-Ref
Outputs controls for the current dashboard widget.

param: mixed $dashboard
param: array $meta_box
since: 2.7.0

wp_dashboard()   X-Ref
Displays the dashboard.

since: 2.5.0

wp_dashboard_right_now()   X-Ref
Dashboard widget that displays some basic stats about the site.

Formerly 'Right Now'. A streamlined 'At a Glance' as of 3.8.

since: 2.7.0

wp_network_dashboard_right_now()   X-Ref

since: 3.1.0

wp_dashboard_quick_press( $error_msg = false )   X-Ref
The Quick Draft widget display and creation of drafts.

param: string|false $error_msg Optional. Error message. Default false.
since: 3.8.0

wp_dashboard_recent_drafts( $drafts = false )   X-Ref
Show recent drafts of the user on the dashboard.

param: WP_Post[]|false $drafts Optional. Array of posts to display. Default false.
since: 2.7.0

_wp_dashboard_recent_comments_row( &$comment, $show_date = true )   X-Ref
Outputs a row for the Recent Comments widget.

param: WP_Comment $comment   The current comment.
param: bool       $show_date Optional. Whether to display the date.
since: 2.7.0

wp_dashboard_site_activity()   X-Ref
Callback function for Activity widget.

since: 3.8.0

wp_dashboard_recent_posts( $args )   X-Ref
Generates Publishing Soon and Recently Published sections.

param: array $args {
return: bool False if no posts were found. True otherwise.
since: 3.8.0

wp_dashboard_recent_comments( $total_items = 5 )   X-Ref
Show Comments section.

param: int $total_items Optional. Number of comments to query. Default 5.
return: bool False if no comments were found. True otherwise.
since: 3.8.0

wp_dashboard_rss_output( $widget_id )   X-Ref
Display generic dashboard RSS widget feed.

param: string $widget_id
since: 2.5.0

wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array()   X-Ref
Checks to see if all of the feed url in $check_urls are cached.

If $check_urls is empty, look for the rss feed url found in the dashboard
widget options of $widget_id. If cached, call $callback, a function that
echoes out output for this widget. If not cache, echo a "Loading..." stub
which is later replaced by Ajax call (see top of /wp-admin/index.php)

param: string   $widget_id  The widget ID.
param: callable $callback   The callback function used to display each feed.
param: array    $check_urls RSS feeds.
param: mixed    ...$args    Optional additional parameters to pass to the callback function.
return: bool True on success, false on failure.
since: 2.5.0
since: 5.3.0 Formalized the existing and already documented `...$args` parameter

wp_dashboard_trigger_widget_control( $widget_control_id = false )   X-Ref
Calls widget control callback.

param: int|false $widget_control_id Optional. Registered widget ID. Default false.
since: 2.5.0

wp_dashboard_rss_control( $widget_id, $form_inputs = array()   X-Ref
The RSS dashboard widget control.

Sets up $args to be used as input to wp_widget_rss_form(). Handles POST data
from RSS-type widgets.

param: string $widget_id
param: array  $form_inputs
since: 2.5.0

wp_dashboard_events_news()   X-Ref
Renders the Events and News dashboard widget.

since: 4.8.0

wp_print_community_events_markup()   X-Ref
Prints the markup for the Community Events section of the Events and News Dashboard widget.

since: 4.8.0

wp_print_community_events_templates()   X-Ref
Renders the events templates for the Event and News widget.

since: 4.8.0

wp_dashboard_primary()   X-Ref
'WordPress Events and News' dashboard widget.

since: 2.7.0
since: 4.8.0 Removed popular plugins feed.

wp_dashboard_primary_output( $widget_id, $feeds )   X-Ref
Displays the WordPress events and news feeds.

param: string $widget_id Widget ID.
param: array  $feeds     Array of RSS feeds.
since: 3.8.0
since: 4.8.0 Removed popular plugins feed.

wp_dashboard_quota()   X-Ref
Displays file upload quota on dashboard.

Runs on the {@see 'activity_box_end'} hook in wp_dashboard_right_now().

return: true|void True if not multisite, user can't upload files, or the space check option is disabled.
since: 3.0.0

wp_dashboard_browser_nag()   X-Ref
Displays the browser update nag.

since: 3.2.0
since: 5.8.0 Added a special message for Internet Explorer users.

dashboard_browser_nag_class( $classes )   X-Ref
Adds an additional class to the browser nag if the current version is insecure.

param: string[] $classes Array of meta box classes.
return: string[] Modified array of meta box classes.
since: 3.2.0

wp_check_browser_version()   X-Ref
Checks if the user needs a browser update.

return: array|false Array of browser data on success, false on failure.
since: 3.2.0

wp_dashboard_php_nag()   X-Ref
Displays the PHP update nag.

since: 5.1.0

dashboard_php_nag_class( $classes )   X-Ref
Adds an additional class to the PHP nag if the current version is insecure.

param: string[] $classes Array of meta box classes.
return: string[] Modified array of meta box classes.
since: 5.1.0

wp_dashboard_site_health()   X-Ref
Displays the Site Health Status widget.

since: 5.4.0

wp_dashboard_empty()   X-Ref
Empty function usable by plugins to output empty dashboard widget (to be populated later by JS).

since: 2.5.0

wp_welcome_panel()   X-Ref
Displays a welcome panel to introduce users to WordPress.

since: 3.3.0
since: 5.9.0 Send users to the Site Editor if the active theme is block-based.



Generated: Sun Dec 22 01:00:02 2024 Cross-referenced by PHPXref 0.7.1