Make WordPress Core

Changeset 8970


Ignore:
Timestamp:
09/24/2008 08:02:41 PM (16 years ago)
Author:
ryan
Message:

phpdoc for comments-template from jacobsantos. see #7550

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r8964 r8970  
    1515 * assumed.
    1616 *
    17  * @since 1.5
     17 * @since 1.5.0
    1818 * @uses apply_filters() Calls 'get_comment_author' hook on the comment author
    1919 *
     
    4343 * Retrieve the email of the author of the current comment.
    4444 *
    45  * @since 1.5
     45 * @since 1.5.0
    4646 * @uses apply_filters() Calls the 'get_comment_author_email' hook on the comment author email
    4747 * @uses $comment
     
    101101 * Retrieve the html link to the url of the author of the current comment.
    102102 *
    103  * @since 1.5
     103 * @since 1.5.0
    104104 * @uses apply_filters() Calls 'get_comment_author_link' hook on the complete link HTML or author
    105105 *
     
    131131 * Retrieve the IP address of the author of the current comment.
    132132 *
    133  * @since 1.5
     133 * @since 1.5.0
    134134 * @uses $comment
    135135 * @uses apply_filters()
     
    155155 * Retrieve the url of the author of the current comment.
    156156 *
    157  * @since 1.5
     157 * @since 1.5.0
    158158 * @uses apply_filters() Calls 'get_comment_author_url' hook on the comment author's URL
    159159 *
     
    186186 * in the order of $before, link, and finally $after.
    187187 *
    188  * @since 1.5
     188 * @since 1.5.0
    189189 * @uses apply_filters() Calls the 'get_comment_author_url_link' on the complete HTML before returning.
    190190 *
     
    222222 * Generates semantic classes for each comment element
    223223 *
    224  * @since 2.7
     224 * @since 2.7.0
    225225 *
    226226 * @param string|array $class One or more classes to add to the class list
     
    240240 * Returns the classes for the comment div as an array
    241241 *
    242  * @since 2.7
     242 * @since 2.7.0
    243243 *
    244244 * @param string|array $class One or more classes to add to the class list
     
    309309 * Retrieve the comment date of the current comment.
    310310 *
    311  * @since 1.5
     311 * @since 1.5.0
    312312 * @uses apply_filters() Calls 'get_comment_date' hook with the formated date and the $d parameter respectively
    313313 * @uses $comment
     
    343343 * will appear.
    344344 *
    345  * @since 1.5
     345 * @since 1.5.0
    346346 * @uses $comment
    347347 * @uses apply_filters() Calls 'get_comment_excerpt' on truncated comment
     
    371371 * Display the excerpt of the current comment.
    372372 *
    373  * @since 1.2
     373 * @since 1.2.0
    374374 * @uses apply_filters() Calls 'comment_excerpt' hook before displaying excerpt
    375375 */
     
    381381 * Retrieve the comment id of the current comment.
    382382 *
    383  * @since 1.5
     383 * @since 1.5.0
    384384 * @uses $comment
    385385 * @uses apply_filters() Calls the 'get_comment_ID' hook for the comment ID
     
    405405 * Retrieve the link to the current comment.
    406406 *
    407  * @since 1.5
     407 * @since 1.5.0
    408408 * @uses $comment
    409409 *
     
    419419 * Retrieves the link to the current post comments.
    420420 *
    421  * @since 1.5
     421 * @since 1.5.0
    422422 *
    423423 * @return string The link to the comments
     
    442442 * Retrieve the amount of comments a post has.
    443443 *
    444  * @since 1.5
     444 * @since 1.5.0
    445445 * @uses apply_filters() Calls the 'get_comments_number' hook on the number of comments
    446446 *
     
    493493 * Retrieve the text of the current comment.
    494494 *
    495  * @since 1.5
     495 * @since 1.5.0
    496496 * @uses $comment
    497497 *
     
    517517 * Retrieve the comment time of the current comment.
    518518 *
    519  * @since 1.5
     519 * @since 1.5.0
    520520 * @uses $comment
    521521 * @uses apply_filter() Calls 'get_comment_time' hook with the formatted time, the $d parameter, and $gmt parameter passed.
     
    549549 * Retrieve the comment type of the current comment.
    550550 *
    551  * @since 1.5
     551 * @since 1.5.0
    552552 * @uses $comment
    553553 * @uses apply_filters() Calls the 'get_comment_type' hook on the comment type
     
    594594 * current post is used and appended to the correct page to go to.
    595595 *
    596  * @since 1.5
     596 * @since 1.5.0
    597597 * @uses apply_filters() Calls 'trackback_url' on the resulting trackback URL
    598598 * @uses $id
     
    651651 * Whether the current post is open for comments.
    652652 *
    653  * @since 1.5
     653 * @since 1.5.0
    654654 * @uses $post
    655655 *
     
    668668 * Whether the current post is open for pings.
    669669 *
    670  * @since 1.5
     670 * @since 1.5.0
    671671 * @uses $post
    672672 *
     
    692692 * the 2.1 branch, prior to 2.1.3. Technically added in 2.2.0.
    693693 *
    694  * @since 2.0.10 Backported to 2.0 branch
     694 * Backported to 2.0.10.
     695 *
    695696 * @since 2.1.3
    696697 * @uses $post Gets the ID of the current post for the token
     
    718719 * halted. It is advised for that reason, that the default theme is not deleted.
    719720 *
    720  * @since 1.5
     721 * @since 1.5.0
    721722 * @global array $comment List of comment objects for the current post
    722723 * @uses $wpdb
     
    860861}
    861862
     863/**
     864 * Retrieve HTML content for reply to comment link.
     865 *
     866 * The default arguments that can be override are 'add_below', 'respond_id',
     867 * 'reply_text', 'login_text', and 'depth'. The 'login_text' argument will be
     868 * used, if the user must log in or register first before posting a comment. The
     869 * 'reply_text' will be used, if they can post a reply. The 'add_below' and
     870 * 'respond_id' arguments are for the JavaScript moveAddCommentForm() function
     871 * parameters.
     872 *
     873 * @since 2.7.0
     874 *
     875 * @param array $args Optional. Override default options.
     876 * @param int $comment Optional. Comment being replied to.
     877 * @param int $post Optional. Post that the comment is going to be displayed on.
     878 * @return string|bool|null Link to show comment form, if successful. False, if comments are closed.
     879 */
    862880function comment_reply_link($args = array(), $comment = null, $post = null) {
    863881    global $user_ID;
     
    889907}
    890908
     909/**
     910 * Display HTML content for cancel comment reply link.
     911 *
     912 * @since 2.7.0
     913 *
     914 * @param string $text Optional. Text to display for cancel reply.
     915 * @param string $respond_id Optional. HTML ID attribute for JS cancelCommentReply function.
     916 * @param string $respond_root Optional. Second parameter for JS cancelCommentReply function.
     917 */
    891918function cancel_comment_reply_link($text = '', $respond_id = 'respond', $respond_root = 'content') {
    892919    if ( empty($text) )
     
    895922}
    896923
     924/**
     925 * HTML comment list class.
     926 *
     927 * @package WordPress
     928 * @uses Walker
     929 * @since unknown
     930 */
    897931class Walker_Comment extends Walker {
     932    /**
     933     * @see Walker::$tree_type
     934     * @since unknown
     935     * @var string
     936     */
    898937    var $tree_type = 'comment';
     938
     939    /**
     940     * @see Walker::$db_fields
     941     * @since unknown
     942     * @var array
     943     */
    899944    var $db_fields = array ('parent' => 'comment_parent', 'id' => 'comment_ID');
    900945
     946    /**
     947     * @see Walker::start_lvl()
     948     * @since unknown
     949     *
     950     * @param string $output Passed by reference. Used to append additional content.
     951     * @param int $depth Depth of comment.
     952     * @param array $args Uses 'style' argument for type of HTML list.
     953     */
    901954    function start_lvl(&$output, $depth, $args) {
    902955        $GLOBALS['comment_depth'] = $depth + 1;
     
    915968    }
    916969
     970    /**
     971     * @see Walker::end_lvl()
     972     * @since unknown
     973     *
     974     * @param string $output Passed by reference. Used to append additional content.
     975     * @param int $depth Depth of comment.
     976     * @param array $args Will only append content if style argument value is 'ol' or 'ul'.
     977     */
    917978    function end_lvl(&$output, $depth, $args) {
    918979        $GLOBALS['comment_depth'] = $depth + 1;
     
    931992    }
    932993
     994    /**
     995     * @see Walker::start_el()
     996     * @since unknown
     997     *
     998     * @param string $output Passed by reference. Used to append additional content.
     999     * @param object $comment Comment data object.
     1000     * @param int $depth Depth of comment in reference to parents.
     1001     * @param array $args
     1002     */
    9331003    function start_el(&$output, $comment, $depth, $args) {
    9341004        $depth++;
     
    9771047    }
    9781048
     1049    /**
     1050     * @see Walker::end_el()
     1051     * @since unknown
     1052     *
     1053     * @param string $output Passed by reference. Used to append additional content.
     1054     * @param object $comment
     1055     * @param int $depth Depth of comment.
     1056     * @param array $args
     1057     */
    9791058    function end_el(&$output, $comment, $depth, $args) {
    9801059        if ( !empty($args['end-callback']) ) {
     
    9951074 * Used in the comments.php template to list comments for a particular post
    9961075 *
    997  * @since 2.7
     1076 * @since 2.7.0
    9981077 * @uses Walker_Comment
    9991078 *
Note: See TracChangeset for help on using the changeset viewer.