| [ Index ] |
PHP Cross Reference of Wordpress 2.9.1 |
[Source view] [Print] [Project Stats]
Comment template functions These functions are meant to live inside of the WordPress loop.
| File Size: | 1399 lines (44 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Walker_Comment:: (5 methods):
start_lvl()
end_lvl()
start_el()
end_el()
wp_list_comments()
Class: Walker_Comment - X-Ref
HTML comment list class.| start_lvl(&$output, $depth, $args) X-Ref |
param: string $output Passed by reference. Used to append additional content. param: int $depth Depth of comment. param: array $args Uses 'style' argument for type of HTML list. |
| end_lvl(&$output, $depth, $args) X-Ref |
param: string $output Passed by reference. Used to append additional content. param: int $depth Depth of comment. param: array $args Will only append content if style argument value is 'ol' or 'ul'. |
| start_el(&$output, $comment, $depth, $args) X-Ref |
param: string $output Passed by reference. Used to append additional content. param: object $comment Comment data object. param: int $depth Depth of comment in reference to parents. param: array $args |
| end_el(&$output, $comment, $depth, $args) X-Ref |
param: string $output Passed by reference. Used to append additional content. param: object $comment param: int $depth Depth of comment. param: array $args |
| wp_list_comments($args = array() X-Ref |
| List comments Used in the comments.php template to list comments for a particular post param: string|array $args Formatting options param: array $comments Optional array of comment objects. Defaults to $wp_query->comments |
| get_comment_author() X-Ref |
| Retrieve the author of the current comment. If the comment has an empty comment_author field, then 'Anonymous' person is assumed. return: string The comment author |
| comment_author() X-Ref |
| Displays the author of the current comment. |
| get_comment_author_email() X-Ref |
| Retrieve the email of the author of the current comment. return: string The current comment author's email |
| comment_author_email() X-Ref |
| Display the email of the author of the current global $comment. Care should be taken to protect the email address and assure that email harvesters do not capture your commentors' email address. Most assume that their email address will not appear in raw form on the blog. Doing so will enable anyone, including those that people don't want to get the email address and use it for their own means good and bad. |
| comment_author_email_link($linktext='', $before='', $after='') X-Ref |
| Display the html email link to the author of the current comment. Care should be taken to protect the email address and assure that email harvesters do not capture your commentors' email address. Most assume that their email address will not appear in raw form on the blog. Doing so will enable anyone, including those that people don't want to get the email address and use it for their own means good and bad. param: string $linktext The text to display instead of the comment author's email address param: string $before The text or HTML to display before the email link. param: string $after The text or HTML to display after the email link. |
| get_comment_author_email_link($linktext='', $before='', $after='') X-Ref |
| Return the html email link to the author of the current comment. Care should be taken to protect the email address and assure that email harvesters do not capture your commentors' email address. Most assume that their email address will not appear in raw form on the blog. Doing so will enable anyone, including those that people don't want to get the email address and use it for their own means good and bad. param: string $linktext The text to display instead of the comment author's email address param: string $before The text or HTML to display before the email link. param: string $after The text or HTML to display after the email link. |
| get_comment_author_link() X-Ref |
| Retrieve the html link to the url of the author of the current comment. return: string Comment Author name or HTML link for author's URL |
| comment_author_link() X-Ref |
| Display the html link to the url of the author of the current comment. |
| get_comment_author_IP() X-Ref |
| Retrieve the IP address of the author of the current comment. return: unknown |
| comment_author_IP() X-Ref |
| Display the IP address of the author of the current comment. |
| get_comment_author_url() X-Ref |
| Retrieve the url of the author of the current comment. return: string |
| comment_author_url() X-Ref |
| Display the url of the author of the current comment. |
| get_comment_author_url_link( $linktext = '', $before = '', $after = '' ) X-Ref |
| Retrieves the HTML link of the url of the author of the current comment. $linktext parameter is only used if the URL does not exist for the comment author. If the URL does exist then the URL will be used and the $linktext will be ignored. Encapsulate the HTML link between the $before and $after. So it will appear in the order of $before, link, and finally $after. param: string $linktext The text to display instead of the comment author's email address param: string $before The text or HTML to display before the email link. param: string $after The text or HTML to display after the email link. return: string The HTML link between the $before and $after parameters |
| comment_author_url_link( $linktext = '', $before = '', $after = '' ) X-Ref |
| Displays the HTML link of the url of the author of the current comment. param: string $linktext The text to display instead of the comment author's email address param: string $before The text or HTML to display before the email link. param: string $after The text or HTML to display after the email link. |
| comment_class( $class = '', $comment_id = null, $post_id = null, $echo = true ) X-Ref |
| Generates semantic classes for each comment element param: string|array $class One or more classes to add to the class list param: int $comment_id An optional comment ID param: int $post_id An optional post ID param: bool $echo Whether comment_class should echo or return |
| get_comment_class( $class = '', $comment_id = null, $post_id = null ) X-Ref |
| Returns the classes for the comment div as an array param: string|array $class One or more classes to add to the class list param: int $comment_id An optional comment ID param: int $post_id An optional post ID return: array Array of classes |
| get_comment_date( $d = '' ) X-Ref |
| Retrieve the comment date of the current comment. param: string $d The format of the date (defaults to user's config) return: string The comment's date |
| comment_date( $d = '' ) X-Ref |
| Display the comment date of the current comment. param: string $d The format of the date (defaults to user's config) |
| get_comment_excerpt() X-Ref |
| Retrieve the excerpt of the current comment. Will cut each word and only output the first 20 words with '...' at the end. If the word count is less than 20, then no truncating is done and no '...' will appear. return: string The maybe truncated comment with 20 words or less |
| comment_excerpt() X-Ref |
| Display the excerpt of the current comment. |
| get_comment_ID() X-Ref |
| Retrieve the comment id of the current comment. return: int The comment ID |
| comment_ID() X-Ref |
| Displays the comment id of the current comment. |
| get_comment_link( $comment = null, $args = array() X-Ref |
| Retrieve the link to a given comment. param: object|string|int $comment Comment to retrieve. param: array $args Optional args. return: string The permalink to the given comment. |
| get_comments_link() X-Ref |
| Retrieves the link to the current post comments. return: string The link to the comments |
| comments_link( $deprecated = '', $deprecated = '' ) X-Ref |
| Displays the link to the current post comments. param: string $deprecated Not Used param: bool $deprecated Not Used |
| get_comments_number( $post_id = 0 ) X-Ref |
| Retrieve the amount of comments a post has. param: int $post_id The Post ID return: int The number of comments a post has |
| comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) X-Ref |
| Display the language string for the number of comments the current post has. param: string $zero Text for no comments param: string $one Text for one comment param: string $more Text for more than one comment param: string $deprecated Not used. |
| get_comment_text() X-Ref |
| Retrieve the text of the current comment. return: string The comment content |
| comment_text() X-Ref |
| Displays the text of the current comment. |
| get_comment_time( $d = '', $gmt = false, $translate = true ) X-Ref |
| Retrieve the comment time of the current comment. param: string $d Optional. The format of the time (defaults to user's config) param: bool $gmt Whether to use the GMT date param: bool $translate Whether to translate the time (for use in feeds) return: string The formatted time |
| comment_time( $d = '' ) X-Ref |
| Display the comment time of the current comment. param: string $d Optional. The format of the time (defaults to user's config) |
| get_comment_type() X-Ref |
| Retrieve the comment type of the current comment. return: string The comment type |
| comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) X-Ref |
| Display the comment type of the current comment. param: string $commenttxt The string to display for comment type param: string $trackbacktxt The string to display for trackback type param: string $pingbacktxt The string to display for pingback type |
| get_trackback_url() X-Ref |
| Retrieve The current post's trackback URL. There is a check to see if permalink's have been enabled and if so, will retrieve the pretty path. If permalinks weren't enabled, the ID of the current post is used and appended to the correct page to go to. return: string The trackback URL after being filtered |
| trackback_url($deprecated = true) X-Ref |
| Displays the current post's trackback URL. param: bool $deprecated Remove backwards compat in 2.5 return: void|string Should only be used to echo the trackback URL, use get_trackback_url() for the result instead. |
| trackback_rdf($deprecated = '') X-Ref |
| Generates and displays the RDF for the trackback information of current post. param: int $deprecated Not used (Was $timezone = 0) |
| comments_open( $post_id=NULL ) X-Ref |
| Whether the current post is open for comments. param: int $post_id An optional post ID to check instead of the current post. return: bool True if the comments are open |
| pings_open( $post_id = NULL ) X-Ref |
| Whether the current post is open for pings. param: int $post_id An optional post ID to check instead of the current post. return: bool True if pings are accepted |
| wp_comment_form_unfiltered_html_nonce() X-Ref |
| Displays form token for unfiltered comments. Will only display nonce token if the current user has permissions for unfiltered html. Won't display the token for other users. The function was backported to 2.0.10 and was added to versions 2.1.3 and above. Does not exist in versions prior to 2.0.10 in the 2.0 branch and in the 2.1 branch, prior to 2.1.3. Technically added in 2.2.0. Backported to 2.0.10. |
| comments_template( $file = '/comments.php', $separate_comments = false ) X-Ref |
| Loads the comment template specified in $file. Will not display the comments template if not on single post or page, or if the post does not have comments. Uses the WordPress database object to query for the comments. The comments are passed through the 'comments_array' filter hook with the list of comments and the post ID respectively. The $file path is passed through a filter hook called, 'comments_template' which includes the TEMPLATEPATH and $file combined. Tries the $filtered path first and if it fails it will require the default comment themplate from the default theme. If either does not exist, then the WordPress process will be halted. It is advised for that reason, that the default theme is not deleted. param: string $file Optional, default '/comments.php'. The file to load param: bool $separate_comments Optional, whether to separate the comments by comment type. Default is false. return: null Returns null if no comments appear |
| comments_popup_script($width=400, $height=400, $file='') X-Ref |
| Displays the JS popup script to show a comment. If the $file parameter is empty, then the home page is assumed. The defaults for the window are 400px by 400px. For the comment link popup to work, this function has to be called or the normal comment link will be assumed. param: int $width Optional. The width of the popup window param: int $height Optional. The height of the popup window param: string $file Optional. Sets the location of the popup window |
| comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) X-Ref |
| Displays the link to the comments popup window for the current post ID. Is not meant to be displayed on single posts and pages. Should be used on the lists of posts param: string $zero The string to display when no comments param: string $one The string to display when only one comment is available param: string $more The string to display when there are more than one comment param: string $css_class The CSS class to use for comments param: string $none The string to display when comments have been turned off return: null Returns null on single posts and pages. |
| get_comment_reply_link($args = array() X-Ref |
| Retrieve HTML content for reply to comment link. The default arguments that can be override are 'add_below', 'respond_id', 'reply_text', 'login_text', and 'depth'. The 'login_text' argument will be used, if the user must log in or register first before posting a comment. The 'reply_text' will be used, if they can post a reply. The 'add_below' and 'respond_id' arguments are for the JavaScript moveAddCommentForm() function parameters. param: array $args Optional. Override default options. param: int $comment Optional. Comment being replied to. param: int $post Optional. Post that the comment is going to be displayed on. return: string|bool|null Link to show comment form, if successful. False, if comments are closed. |
| comment_reply_link($args = array() X-Ref |
| Displays the HTML content for reply to comment link. param: array $args Optional. Override default options. param: int $comment Optional. Comment being replied to. param: int $post Optional. Post that the comment is going to be displayed on. return: string|bool|null Link to show comment form, if successful. False, if comments are closed. |
| get_post_reply_link($args = array() X-Ref |
| Retrieve HTML content for reply to post link. The default arguments that can be override are 'add_below', 'respond_id', 'reply_text', 'login_text', and 'depth'. The 'login_text' argument will be used, if the user must log in or register first before posting a comment. The 'reply_text' will be used, if they can post a reply. The 'add_below' and 'respond_id' arguments are for the JavaScript moveAddCommentForm() function parameters. param: array $args Optional. Override default options. param: int|object $post Optional. Post that the comment is going to be displayed on. Defaults to current post. return: string|bool|null Link to show comment form, if successful. False, if comments are closed. |
| post_reply_link($args = array() X-Ref |
| Displays the HTML content for reply to post link. param: array $args Optional. Override default options. param: int|object $post Optional. Post that the comment is going to be displayed on. return: string|bool|null Link to show comment form, if successful. False, if comments are closed. |
| get_cancel_comment_reply_link($text = '') X-Ref |
| Retrieve HTML content for cancel comment reply link. param: string $text Optional. Text to display for cancel reply link. |
| cancel_comment_reply_link($text = '') X-Ref |
| Display HTML content for cancel comment reply link. param: string $text Optional. Text to display for cancel reply link. |
| comment_id_fields() X-Ref |
| Output hidden input HTML for replying to comments. |
| comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) X-Ref |
| Display text based on comment reply status. Only affects users with Javascript disabled. param: string $noreplytext Optional. Text to display when not replying to a comment. param: string $replytext Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to. param: string $linktoparent Optional. Boolean to control making the author's name a link to their comment. |
| Generated: Fri Jan 8 00:19:48 2010 | Cross-referenced by PHPXref 0.7 |