Make WordPress Core

Ticket #7661: 7661.r8947.diff

File 7661.r8947.diff, 10.7 KB (added by jacobsantos, 15 years ago)

More inline documentation based off of r8947

  • widgets.php

     
    377377 * @since 2.2.0
    378378 * @see wp_unregister_widget_control()
    379379 *
    380  * @param int $id Widget ID
     380 * @param int $id Widget ID.
    381381 */
    382382function unregister_widget_control($id) {
    383383        return wp_unregister_widget_control($id);
     
    637637/* Default Widgets */
    638638
    639639/**
    640  * {@internal Missing Short Description}}
     640 * Display pages widget.
    641641 *
    642  * {@internal Missing Long Description}}
    643  *
    644642 * @since 2.2.0
    645643 *
    646644 * @param array $args Widget arguments.
     
    672670}
    673671
    674672/**
    675  * {@internal Missing Short Description}}
     673 * Display and process pages widget options form.
    676674 *
    677  * {@internal Missing Long Description}}
    678  *
    679675 * @since 2.2.0
    680676 */
    681677function wp_widget_pages_control() {
     
    720716}
    721717
    722718/**
    723  * {@internal Missing Short Description}}
     719 * Display links widget.
    724720 *
    725  * {@internal Missing Long Description}}
    726  *
    727721 * @since 2.2.0
    728722 *
    729723 * @param array $args Widget arguments.
     
    740734}
    741735
    742736/**
    743  * {@internal Missing Short Description}}
     737 * Display search widget.
    744738 *
    745  * {@internal Missing Long Description}}
    746  *
    747739 * @since 2.2.0
    748740 *
    749741 * @param array $args Widget arguments.
     
    769761}
    770762
    771763/**
    772  * {@internal Missing Short Description}}
     764 * Display archives widget.
    773765 *
    774  * {@internal Missing Long Description}}
    775  *
    776766 * @since 2.2.0
    777767 *
    778768 * @param array $args Widget arguments.
     
    803793}
    804794
    805795/**
    806  * {@internal Missing Short Description}}
     796 * Display and process archives widget options form.
    807797 *
    808  * {@internal Missing Long Description}}
    809  *
    810798 * @since 2.2.0
    811799 */
    812800function wp_widget_archives_control() {
     
    835823}
    836824
    837825/**
    838  * {@internal Missing Short Description}}
     826 * Display meta widget.
    839827 *
    840  * {@internal Missing Long Description}}
     828 * Displays log in/out, RSS feed links, etc.
    841829 *
    842830 * @since 2.2.0
    843831 *
    844  * @param array $args Widget Arguments
     832 * @param array $args Widget arguments.
    845833 */
    846834function wp_widget_meta($args) {
    847835        extract($args);
     
    863851}
    864852
    865853/**
    866  * {@internal Missing Short Description}}
     854 * Display and process meta widget options form.
    867855 *
    868  * {@internal Missing Long Description}}
    869  *
    870856 * @since 2.2.0
    871857 */
    872858function wp_widget_meta_control() {
     
    886872}
    887873
    888874/**
    889  * {@internal Missing Short Description}}
     875 * Display calendar widget.
    890876 *
    891  * {@internal Missing Long Description}}
    892  *
    893877 * @since 2.2.0
    894878 *
    895879 * @param array $args Widget arguments.
     
    908892}
    909893
    910894/**
    911  * {@internal Missing Short Description}}
     895 * Display and process calendar widget options form.
    912896 *
    913  * {@internal Missing Long Description}}
    914  *
    915897 * @since 2.2.0
    916898 */
    917899function wp_widget_calendar_control() {
     
    965947}
    966948
    967949/**
    968  * {@internal Missing Short Description}}
     950 * Display and process text widget options form.
    969951 *
    970  * {@internal Missing Long Description}}
    971  *
    972952 * @since 2.2.0
    973953 *
    974954 * @param int $widget_args Widget number.
     
    10361016}
    10371017
    10381018/**
    1039  * {@internal Missing Short Description}}
     1019 * Register text widget on startup.
    10401020 *
    1041  * {@internal Missing Long Description}}
    1042  *
    10431021 * @since 2.2.0
    10441022 */
    10451023function wp_widget_text_register() {
     
    10671045}
    10681046
    10691047/**
    1070  * {@internal Missing Short Description}}
     1048 * Display categories widget.
    10711049 *
    1072  * {@internal Missing Long Description}}
     1050 * Allows multiple category widgets.
    10731051 *
    10741052 * @since 2.2.0
    10751053 *
    1076  * @param unknown_type $args
    1077  * @param unknown_type $number
     1054 * @param array $args Widget arguments.
     1055 * @param int $number Widget number.
    10781056 */
    1079 // See large comment section at end of this file
    10801057function wp_widget_categories($args, $widget_args = 1) {
    10811058        extract($args, EXTR_SKIP);
    10821059        if ( is_numeric($widget_args) )
     
    11321109}
    11331110
    11341111/**
    1135  * {@internal Missing Short Description}}
     1112 * Display and process categories widget options form.
    11361113 *
    1137  * {@internal Missing Long Description}}
    1138  *
    11391114 * @since 2.2.0
    11401115 *
    1141  * @param unknown_type $number
     1116 * @param int $widget_args Widget number.
    11421117 */
    11431118function wp_widget_categories_control( $widget_args ) {
    11441119        global $wp_registered_widgets;
     
    12271202}
    12281203
    12291204/**
    1230  * {@internal Missing Short Description}}
     1205 * Register categories widget on startup.
    12311206 *
    1232  * {@internal Missing Long Description}}
    1233  *
    12341207 * @since 2.3.0
    12351208 */
    12361209function wp_widget_categories_register() {
     
    12621235}
    12631236
    12641237/**
    1265  * {@internal Missing Short Description}}
     1238 * Upgrade previous category widget to current version.
    12661239 *
    1267  * {@internal Missing Long Description}}
    1268  *
    12691240 * @since 2.3.0
    12701241 *
    1271  * @return unknown
     1242 * @return array
    12721243 */
    12731244function wp_widget_categories_upgrade() {
    12741245        $options = get_option( 'widget_categories' );
     
    12981269}
    12991270
    13001271/**
    1301  * {@internal Missing Short Description}}
     1272 * Display recent entries widget.
    13021273 *
    1303  * {@internal Missing Long Description}}
    1304  *
    13051274 * @since 2.2.0
    13061275 *
    1307  * @param unknown_type $args
    1308  * @return unknown
     1276 * @param array $args Widget arguments.
     1277 * @return int Displayed cache.
    13091278 */
    13101279function wp_widget_recent_entries($args) {
    13111280        if ( '%BEG_OF_TITLE%' != $args['before_title'] ) {
     
    13461315/**
    13471316 * Remove recent entries widget items cache.
    13481317 *
    1349  * {@internal Missing Long Description}}
    1350  *
    13511318 * @since 2.2.0
    13521319 */
    13531320function wp_flush_widget_recent_entries() {
     
    13591326add_action('switch_theme', 'wp_flush_widget_recent_entries');
    13601327
    13611328/**
    1362  * {@internal Missing Short Description}}
     1329 * Display and process recent entries widget options form.
    13631330 *
    1364  * {@internal Missing Long Description}}
    1365  *
    13661331 * @since 2.2.0
    13671332 */
    13681333function wp_widget_recent_entries_control() {
     
    13921357}
    13931358
    13941359/**
    1395  * {@internal Missing Short Description}}
     1360 * Display recent comments widget.
    13961361 *
    1397  * {@internal Missing Long Description}}
    1398  *
    13991362 * @since 2.2.0
    14001363 *
    1401  * @param unknown_type $args
     1364 * @param array $args Widget arguments.
    14021365 */
    14031366function wp_widget_recent_comments($args) {
    14041367        global $wpdb, $comments, $comment;
     
    14311394/**
    14321395 * Remove the cache for recent comments widget.
    14331396 *
    1434  * {@internal Missing Long Description}}
    1435  *
    14361397 * @since 2.2.0
    14371398 */
    14381399function wp_delete_recent_comments_cache() {
     
    14421403add_action( 'wp_set_comment_status', 'wp_delete_recent_comments_cache' );
    14431404
    14441405/**
    1445  * {@internal Missing Short Description}}
     1406 * Display and process recent comments widget options form.
    14461407 *
    1447  * {@internal Missing Long Description}}
    1448  *
    14491408 * @since 2.2.0
    14501409 */
    14511410function wp_widget_recent_comments_control() {
     
    14761435/**
    14771436 * Display the style for recent comments widget.
    14781437 *
    1479  * {@internal Missing Long Description}}
    1480  *
    14811438 * @since 2.2.0
    14821439 */
    14831440function wp_widget_recent_comments_style() {
     
    14871444}
    14881445
    14891446/**
    1490  * {@internal Missing Short Description}}
     1447 * Register recent comments with control and hook for 'wp_head' action.
    14911448 *
    1492  * {@internal Missing Long Description}}
    1493  *
    14941449 * @since 2.2.0
    14951450 */
    14961451function wp_widget_recent_comments_register() {
     
    15031458}
    15041459
    15051460/**
    1506  * {@internal Missing Short Description}}
     1461 * Display RSS widget.
    15071462 *
    1508  * {@internal Missing Long Description}}
     1463 * Allows for multiple widgets to be displayed.
    15091464 *
    15101465 * @since 2.2.0
    15111466 *
    1512  * @param unknown_type $args
    1513  * @param unknown_type $number
     1467 * @param array $args Widget arguments.
     1468 * @param int $number Widget number.
    15141469 */
    1515 // See large comment section at end of this file
    15161470function wp_widget_rss($args, $widget_args = 1) {
    15171471        extract($args, EXTR_SKIP);
    15181472        if ( is_numeric($widget_args) )
     
    15641518        echo $after_widget;
    15651519}
    15661520
     1521/**
     1522 * Display the RSS entries in a list.
     1523 *
     1524 * @since 2.5.0
     1525 *
     1526 * @param string|array|object $rss RSS url.
     1527 * @param array $args Widget arguments.
     1528 */
    15671529function wp_widget_rss_output( $rss, $args = array() ) {
    15681530        if ( is_string( $rss ) ) {
    15691531                require_once(ABSPATH . WPINC . '/rss.php');
     
    16481610}
    16491611
    16501612/**
    1651  * wp_widget_rss_control() - {@internal Missing Short Description}}
     1613 * Display and process RSS widget control form.
    16521614 *
    1653  * {@internal Missing Long Description}}
    1654  *
    16551615 * @since 2.2.0
    16561616 *
    1657  * @param unknown_type $widget_args
     1617 * @param int $widget_args Widget number.
    16581618 */
    16591619function wp_widget_rss_control($widget_args) {
    16601620        global $wp_registered_widgets;
     
    17261686 * and are as follows: 'url', 'title', 'items', 'show_summary', 'show_author',
    17271687 * 'show_date'.
    17281688 *
    1729  * @since unknown
     1689 * @since 2.5.0
    17301690 *
    17311691 * @param array|string $args Values for input fields.
    17321692 * @param array $inputs Override default display options.
     
    18131773 * feed items, error (if any), and whether to show summary, author, and date.
    18141774 * All respectively in the order of the array elements.
    18151775 *
    1816  * @since unknown
     1776 * @since 2.5.0
    18171777 *
    18181778 * @param array $widget_rss RSS widget feed data. Expects unescaped data.
    18191779 * @param bool $check_feed Optional, default is true. Whether to check feed for errors.
     
    18481808}
    18491809
    18501810/**
    1851  * Register RSS widget to allow multiple RSS widgets.
     1811 * Register RSS widget to allow multiple RSS widgets on startup.
    18521812 *
    18531813 * @since 2.2.0
    18541814 */
     
    19231883}
    19241884
    19251885/**
    1926  * Register all of the default WordPress widgets.
     1886 * Register all of the default WordPress widgets on startup.
    19271887 *
    19281888 * Calls 'widgets_init' action after all of the WordPress widgets have been
    19291889 * registered.
     
    19741934
    19751935add_action('init', 'wp_widgets_init', 1);
    19761936
    1977 /* Pattern for multi-widget (allows multiple instances such as the text widget).
     1937/*
     1938 * Pattern for multi-widget (allows multiple instances such as the text widget).
     1939 *
     1940 * Make sure to close the comments after copying.
    19781941
    1979 // Displays widget on blag
    1980 // $widget_args: number
    1981 //    number: which of the several widgets of this type do we mean
     1942/**
     1943 * Displays widget.
     1944 *
     1945 * Supports multiple widgets.
     1946 *
     1947 * @param array $args Widget arguments.
     1948 * @param array|int $widget_args Widget number. Which of the several widgets of this type do we mean.
     1949 * /
    19821950function widget_many( $args, $widget_args = 1 ) {
    19831951        extract( $args, EXTR_SKIP );
    19841952        if ( is_numeric($widget_args) )
     
    19981966        echo $after_widget;
    19991967}
    20001968
    2001 // Displays form for a particular instance of the widget.  Also updates the data after a POST submit
    2002 // $widget_args: number
    2003 //    number: which of the several widgets of this type do we mean
     1969/**
     1970 * Displays form for a particular instance of the widget.
     1971 *
     1972 * Also updates the data after a POST submit.
     1973 *
     1974 * @param array|int $widget_args Widget number. Which of the several widgets of this type do we mean.
     1975 * /
    20041976function widget_many_control( $widget_args = 1 ) {
    20051977        global $wp_registered_widgets;
    20061978        static $updated = false; // Whether or not we have already updated the data after a POST submit
     
    20682040<?php
    20692041}
    20702042
    2071 // Registers each instance of our widget on startup
     2043/**
     2044 * Registers each instance of our widget on startup.
     2045 * /
    20722046function widget_many_register() {
    20732047        if ( !$options = get_option('widget_many') )
    20742048                $options = array();