[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

WordPress Dashboard Widget Administration Screen API

File Size: 2129 lines (70 kb)
Included or required: 5 times
Referenced: 0 times
Includes or requires: 1 file
 wp-admin/includes/class-wp-site-health.php

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.


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.

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

param: mixed $dashboard
param: array $meta_box

wp_dashboard()   X-Ref
Displays the dashboard.


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.


wp_network_dashboard_right_now()   X-Ref


wp_dashboard_quick_press( $error_msg = false )   X-Ref
Displays the Quick Draft widget.

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

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.

_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.

wp_dashboard_site_activity()   X-Ref
Outputs the Activity widget.

Callback function for {@see 'dashboard_activity'}.


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.

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.

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

param: string $widget_id

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.

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.

wp_dashboard_rss_control( $widget_id, $form_inputs = array()   X-Ref
Sets up the RSS dashboard widget control and $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

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


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


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


wp_dashboard_primary()   X-Ref
No description

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.

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.

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


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.

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.

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


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.

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


wp_dashboard_empty()   X-Ref
Outputs empty dashboard widget to be populated by JS later.

Usable by plugins.


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




Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref