WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/17/2008 12:40:10 AM (10 years ago)
Author:
ryan
Message:

phpdoc for wp-admin/includes from jacobsantos. see #7527

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r8845 r8912  
    11<?php
    2 
    3 // Registers dashboard widgets, handles POST data, sets up filters
     2/**
     3 * WordPress Dashboard Widget Administration Panel API
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/**
     10 * Registers dashboard widgets.
     11 *
     12 * handles POST data, sets up filters.
     13 *
     14 * @since unknown
     15 */
    416function wp_dashboard_setup() {
    517    global $wpdb, $wp_dashboard_sidebars;
     
    194206}
    195207
    196 // Echoes out the dashboard
     208/**
     209 * Displays the dashboard.
     210 *
     211 * @since unknown
     212 */
    197213function wp_dashboard() {
    198214    echo "<div id='dashboard-widgets'>\n\n";
     
    206222}
    207223
    208 // Makes sidebar_widgets option reflect the dashboard settings
     224/**
     225 * Makes sidebar_widgets option reflect the dashboard settings.
     226 *
     227 * @since unknown
     228 *
     229 * @return array WordPress Dashboard Widgets list.
     230 */
    209231function wp_dashboard_sidebars_widgets() { // hackery
    210232    return $GLOBALS['wp_dashboard_sidebars'];
     
    213235// Modifies sidbar params on the fly to set up ids, class names, titles for each widget (called once per widget)
    214236// Switches widget to edit mode if $_GET['edit']
     237/**
     238 * {@internal Missing Short Description}}
     239 *
     240 * @since unknown
     241 *
     242 * @param unknown_type $params
     243 * @return unknown
     244 */
    215245function wp_dashboard_dynamic_sidebar_params( $params ) {
    216246    global $wp_registered_widgets, $wp_registered_widget_controls;
     
    484514}
    485515
     516/**
     517 * Display recent comments dashboard widget content.
     518 *
     519 * @since unknown
     520 *
     521 * @param unknown_type $sidebar_args
     522 */
    486523function wp_dashboard_recent_comments( $sidebar_args ) {
    487524    global $comment;
     
    537574}
    538575
    539 // $sidebar_args are handled by wp_dashboard_empty()
     576/**
     577 * Display incoming links dashboard widget content.
     578 *
     579 * $sidebar_args are handled by wp_dashboard_empty().
     580 *
     581 * @since unknown
     582 */
    540583function wp_dashboard_incoming_links_output() {
    541584    $widgets = get_option( 'dashboard_widget_options' );
     
    597640}
    598641
    599 // $sidebar_args are handled by wp_dashboard_empty()
     642/**
     643 * {@internal Missing Short Description}}
     644 *
     645 * $sidebar_args are handled by wp_dashboard_empty().
     646 *
     647 * @since unknown
     648 *
     649 * @param int $widget_id
     650 */
    600651function wp_dashboard_rss_output( $widget_id ) {
    601652    $widgets = get_option( 'dashboard_widget_options' );
     
    603654}
    604655
    605 // $sidebar_args are handled by wp_dashboard_empty()
     656/**
     657 * Display secondary dashboard RSS widget feed.
     658 *
     659 * $sidebar_args are handled by wp_dashboard_empty().
     660 *
     661 * @since unknown
     662 *
     663 * @return unknown
     664 */
    606665function wp_dashboard_secondary_output() {
    607666    $widgets = get_option( 'dashboard_widget_options' );
     
    625684}
    626685
    627 // $sidebar_args are handled by wp_dashboard_empty()
     686/**
     687 * Display plugins most popular, newest plugins, and recently updated widget text.
     688 *
     689 * $sidebar_args are handled by wp_dashboard_empty().
     690 *
     691 * @since unknown
     692 */
    628693function wp_dashboard_plugins_output() {
    629694    $popular = @fetch_rss( 'http://wordpress.org/extend/plugins/rss/browse/popular/' );
     
    673738}
    674739
    675 // Checks to see if all of the feed url in $check_urls are cached.
    676 // If $check_urls is empty, look for the rss feed url found in the dashboard widget optios of $widget_id.
    677 // If cached, call $callback, a function that echoes out output for this widget.
    678 // If not cache, echo a "Loading..." stub which is later replaced by AJAX call (see top of /wp-admin/index.php)
     740/**
     741 * Checks to see if all of the feed url in $check_urls are cached.
     742 *
     743 * If $check_urls is empty, look for the rss feed url found in the dashboard
     744 * widget optios of $widget_id. If cached, call $callback, a function that
     745 * echoes out output for this widget. If not cache, echo a "Loading..." stub
     746 * which is later replaced by AJAX call (see top of /wp-admin/index.php)
     747 *
     748 * @since unknown
     749 *
     750 * @param int $widget_id
     751 * @param callback $callback
     752 * @param array $check_urls RSS feeds
     753 * @return bool False on failure. True on success.
     754 */
    679755function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
    680756    $loading = '<p class="widget-loading">' . __( 'Loading&#8230;' ) . '</p>';
     
    712788}
    713789
    714 // Empty widget used for JS/AJAX created output.
    715 // Callback inserts content between before_widget and after_widget.  Used when widget is in edit mode.  Can also be used for custom widgets.
     790/**
     791 * Empty widget used for JS/AJAX created output.
     792 *
     793 * Callback inserts content between before_widget and after_widget. Used when
     794 * widget is in edit mode. Can also be used for custom widgets.
     795 *
     796 * @since unknown
     797 *
     798 * @param array $sidebar_args
     799 * @param callback $callback Optional. Only used in edit mode.
     800 */
    716801function wp_dashboard_empty( $sidebar_args, $callback = false ) {
    717802    extract( $sidebar_args, EXTR_SKIP );
     
    733818}
    734819
    735 /* Dashboard Widgets Controls. Ssee also wp_dashboard_empty() */
     820/* Dashboard Widgets Controls. See also wp_dashboard_empty() */
    736821
    737822// Temp
     
    741826
    742827// Calls widget_control callback
     828/**
     829 * Calls widget control callback.
     830 *
     831 * @since unknown
     832 *
     833 * @param int $widget_control_id Registered Widget ID.
     834 */
    743835function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
    744836    global $wp_registered_widget_controls;
     
    747839}
    748840
    749 // Sets up $args to be used as input to wp_widget_rss_form(), handles POST data from RSS-type widgets
     841/**
     842 * The RSS dashboard widget control.
     843 *
     844 * Sets up $args to be used as input to wp_widget_rss_form(). Handles POST data
     845 * from RSS-type widgets.
     846 *
     847 * @since unknown
     848 *
     849 * @param array $args Expects 'widget_id' and 'form_inputs'.
     850 * @return bool|null False if no widget_id is given. Null on success.
     851 */
    750852function wp_dashboard_rss_control( $args ) {
    751853    extract( $args );
Note: See TracChangeset for help on using the changeset viewer.