[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

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

WordPress Dashboard Widget Administration Screen API

File Size: 1824 lines (61 kb)
Included or required: 5 times
Referenced: 0 times
Includes or requires: 0 files

Defines 29 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_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 )   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

_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
The Quick Draft widget display and creation of drafts.

param: string $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[] $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
Callback function for Activity widget.


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

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

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

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

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)

return: bool False on failure. True on success.
param: string   $widget_id  The widget ID.
param: callable $callback   The callback funtion used to display each feed.
param: array    $check_urls RSS feeds
param: mixed    ...$args    Optional additional parameters to pass to the callback function when it's called.

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

param: int $widget_control_id Registered Widget ID.

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

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
'WordPress Events and News' dashboard widget.


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

param: string $widget_id Widget ID.
param: array  $feeds     Array of RSS feeds.

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

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

return: bool|null True if not multisite, user can't upload files, or the space check option is disabled.

wp_dashboard_browser_nag()   X-Ref
No description

dashboard_browser_nag_class( $classes )   X-Ref

return: array
param: array $classes

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

return: array|bool False on failure, array of browser data on success.

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.

return: array Modified metabox classes.
param: array $classes Metabox classes.

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


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




Generated: Fri Sep 20 08:20:02 2019 Cross-referenced by PHPXref 0.7