cancel_comment_reply_link (line 1154)
Display HTML content for cancel comment reply link.
void
cancel_comment_reply_link
([string $text = ''])
-
string
$text: Optional. Text to display for cancel reply link.
comments_link (line 530)
Displays the link to the current post comments.
void
comments_link
([string $deprecated = ''], [bool $deprecated_2 = ''])
-
string
$deprecated: Not Used
-
bool
$deprecated_2: Not Used
comments_number (line 573)
Display the language string for the number of comments the current post has.
void
comments_number
([string $zero = false], [string $one = false], [string $more = false], [string $deprecated = ''])
-
string
$zero: Text for no comments
-
string
$one: Text for one comment
-
string
$more: Text for more than one comment
-
string
$deprecated: Not used.
comments_open (line 772)
Whether the current post is open for comments.
bool
comments_open
([int $post_id = null])
-
int
$post_id: An optional post ID to check instead of the current post.
comments_popup_link (line 969)
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
null
comments_popup_link
([string $zero = false], [string $one = false], [string $more = false], [string $css_class = ''], [string $none = false])
-
string
$zero: The string to display when no comments
-
string
$one: The string to display when only one comment is available
-
string
$more: The string to display when there are more than one comment
-
string
$css_class: The CSS class to use for comments
-
string
$none: The string to display when comments have been turned off
comments_popup_script (line 937)
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.
void
comments_popup_script
([int $width = 400], [int $height = 400], [string $file = ''])
-
int
$width: Optional. The width of the popup window
-
int
$height: Optional. The height of the popup window
-
string
$file: Optional. Sets the location of the popup window
comments_template (line 849)
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 template 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.
null
comments_template
([string $file = '/comments.php'], [bool $separate_comments = false])
-
string
$file: Optional, default '/comments.php'. The file to load
-
bool
$separate_comments: Optional, whether to separate the comments by comment type. Default is false.
comment_author (line 46)
Displays the author of the current comment.
void
comment_author
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to print the author. Optional.
comment_author_email (line 80)
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.
void
comment_author_email
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to print the author's email. Optional.
comment_author_email_link (line 102)
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.
void
comment_author_email_link
([string $linktext = ''], [string $before = ''], [string $after = ''])
-
string
$linktext: The text to display instead of the comment author's email address
-
string
$before: The text or HTML to display before the email link.
-
string
$after: The text or HTML to display after the email link.
comment_author_IP (line 194)
Display the IP address of the author of the current comment.
void
comment_author_IP
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to print the author's IP address. Optional.
comment_author_link (line 167)
Display the html link to the url of the author of the current comment.
void
comment_author_link
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to print the author's link. Optional.
comment_author_url (line 223)
Display the url of the author of the current comment.
void
comment_author_url
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to print the author's URL. Optional.
comment_author_url_link (line 266)
Displays the HTML link of the url of the author of the current comment.
void
comment_author_url_link
([string $linktext = ''], [string $before = ''], [string $after = ''])
-
string
$linktext: The text to display instead of the comment author's email address
-
string
$before: The text or HTML to display before the email link.
-
string
$after: The text or HTML to display after the email link.
comment_class (line 280)
Generates semantic classes for each comment element
void
comment_class
([string|array $class = ''], [int $comment_id = null], [int $post_id = null], [bool $echo = true])
-
string|array
$class: One or more classes to add to the class list
-
int
$comment_id: An optional comment ID
-
int
$post_id: An optional post ID
-
bool
$echo: Whether comment_class should echo or return
comment_date (line 389)
Display the comment date of the current comment.
void
comment_date
([string $d = ''], [int $comment_ID = 0])
-
string
$d: The format of the date (defaults to user's config)
-
int
$comment_ID: The ID of the comment for which to print the date. Optional.
comment_excerpt (line 434)
Display the excerpt of the current comment.
void
comment_excerpt
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to print the excerpt. Optional.
comment_form (line 1510)
Outputs a complete commenting form for use within a template.
Most strings and form fields may be controlled through the $args array passed into the function, while you may also choose to use the comment_form_default_fields filter to modify the array of default fields if you'd just like to add a new one or remove a single field. All fields are also individually passed through a filter of the form comment_form_field_$name where $name is the key used in the array of fields.
void
comment_form
([array $args = array()], [mixed $post_id = null])
-
array
$args: Options for strings, fields etc in the form
-
mixed
$post_id: Post ID to generate the form for, uses the current post if null
comment_form_title (line 1194)
Display text based on comment reply status. Only affects users with Javascript disabled.
void
comment_form_title
([string $noreplytext = false], [string $replytext = false], [string $linktoparent = true])
-
string
$noreplytext: Optional. Text to display when not replying to a comment.
-
string
$replytext: Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to.
-
string
$linktoparent: Optional. Boolean to control making the author's name a link to their comment.
comment_ID (line 458)
Displays the comment id of the current comment.
void
comment_ID
()
comment_id_fields (line 1181)
Output hidden input HTML for replying to comments.
void
comment_id_fields
([ $id = 0])
comment_reply_link (line 1077)
Displays the HTML content for reply to comment link.
string|bool|null
comment_reply_link
([array $args = array()], [int $comment = null], [int $post = null])
-
array
$args: Optional. Override default options.
-
int
$comment: Optional. Comment being replied to.
-
int
$post: Optional. Post that the comment is going to be displayed on.
comment_text (line 612)
Displays the text of the current comment.
void
comment_text
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to print the text. Optional.
comment_time (line 646)
Display the comment time of the current comment.
void
comment_time
([string $d = ''])
-
string
$d: Optional. The format of the time (defaults to user's config)
comment_type (line 677)
Display the comment type of the current comment.
void
comment_type
([string $commenttxt = false], [string $trackbacktxt = false], [string $pingbacktxt = false])
-
string
$commenttxt: The string to display for comment type
-
string
$trackbacktxt: The string to display for trackback type
-
string
$pingbacktxt: The string to display for pingback type
get_cancel_comment_reply_link (line 1138)
Retrieve HTML content for cancel comment reply link.
void
get_cancel_comment_reply_link
([string $text = ''])
-
string
$text: Optional. Text to display for cancel reply link.
get_comments_link (line 518)
Retrieves the link to the current post comments.
string
get_comments_link
([int $post_id = 0])
-
int
$post_id: Optional post id
get_comments_number (line 547)
Retrieve the amount of comments a post has.
int
get_comments_number
([int $post_id = 0])
-
int
$post_id: The Post ID
get_comment_author (line 23)
Retrieve the author of the current comment.
If the comment has an empty comment_author field, then 'Anonymous' person is assumed.
string
get_comment_author
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to retrieve the author. Optional.
get_comment_author_email (line 61)
Retrieve the email of the author of the current comment.
string
get_comment_author_email
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to get the author's email. Optional.
get_comment_author_email_link (line 124)
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.
void
get_comment_author_email_link
([string $linktext = ''], [string $before = ''], [string $after = ''])
-
string
$linktext: The text to display instead of the comment author's email address
-
string
$before: The text or HTML to display before the email link.
-
string
$after: The text or HTML to display after the email link.
get_comment_author_IP (line 181)
Retrieve the IP address of the author of the current comment.
string
get_comment_author_IP
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to get the author's IP address. Optional.
get_comment_author_link (line 147)
Retrieve the html link to the url of the author of the current comment.
string
get_comment_author_link
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to get the author's link. Optional.
get_comment_author_url (line 207)
Retrieve the url of the author of the current comment.
string
get_comment_author_url
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to get the author's URL. Optional.
get_comment_author_url_link (line 245)
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.
string
get_comment_author_url_link
([string $linktext = ''], [string $before = ''], [string $after = ''])
-
string
$linktext: The text to display instead of the comment author's email address
-
string
$before: The text or HTML to display before the email link.
-
string
$after: The text or HTML to display after the email link.
get_comment_class (line 299)
Returns the classes for the comment div as an array
array
get_comment_class
([string|array $class = ''], [int $comment_id = null], [int $post_id = null])
-
string|array
$class: One or more classes to add to the class list
-
int
$comment_id: An optional comment ID
-
int
$post_id: An optional post ID
get_comment_date (line 372)
Retrieve the comment date of the current comment.
string
get_comment_date
([string $d = ''], [int $comment_ID = 0])
-
string
$d: The format of the date (defaults to user's config)
-
int
$comment_ID: The ID of the comment for which to get the date. Optional.
get_comment_excerpt (line 407)
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.
string
get_comment_excerpt
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to get the excerpt. Optional.
get_comment_ID (line 447)
Retrieve the comment id of the current comment.
int
get_comment_ID
()
get_comment_id_fields (line 1165)
Retrieve hidden input HTML for replying to comments.
string
get_comment_id_fields
([ $id = 0])
get_comment_link (line 472)
Retrieve the link to a given comment.
string
get_comment_link
([object|string|int $comment = null], [array $args = array()])
-
object|string|int
$comment: Comment to retrieve.
-
array
$args: Optional args.
get_comment_reply_link (line 1036)
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.
string|bool|null
get_comment_reply_link
([array $args = array()], [int $comment = null], [int $post = null])
-
array
$args: Optional. Override default options.
-
int
$comment: Optional. Comment being replied to.
-
int
$post: Optional. Post that the comment is going to be displayed on.
get_comment_text (line 598)
Retrieve the text of the current comment.
string
get_comment_text
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to get the text. Optional.
get_comment_time (line 629)
Retrieve the comment time of the current comment.
string
get_comment_time
([string $d = ''], [bool $gmt = false], [bool $translate = true])
-
string
$d: Optional. The format of the time (defaults to user's config)
-
bool
$gmt: Whether to use the GMT date
-
bool
$translate: Whether to translate the time (for use in feeds)
get_comment_type (line 660)
Retrieve the comment type of the current comment.
string
get_comment_type
([int $comment_ID = 0])
-
int
$comment_ID: The ID of the comment for which to get the type. Optional.
get_post_reply_link (line 1097)
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.
string|bool|null
get_post_reply_link
([array $args = array()], [int|object $post = null])
-
array
$args: Optional. Override default options.
-
int|object
$post: Optional. Post that the comment is going to be displayed on. Defaults to current post.
get_trackback_url (line 706)
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.
string
get_trackback_url
()
pings_open (line 789)
Whether the current post is open for pings.
bool
pings_open
([int $post_id = null])
-
int
$post_id: An optional post ID to check instead of the current post.
post_reply_link (line 1127)
Displays the HTML content for reply to post link.
string|bool|null
post_reply_link
([array $args = array()], [int|object $post = null])
-
array
$args: Optional. Override default options.
-
int|object
$post: Optional. Post that the comment is going to be displayed on.
trackback_rdf (line 742)
Generates and displays the RDF for the trackback information of current post.
Deprecated in 3.0.0, and restored in 3.0.1.
void
trackback_rdf
([int $deprecated = ''])
-
int
$deprecated: Not used (Was $timezone = 0)
trackback_url (line 724)
Displays the current post's trackback URL.
void|string
trackback_url
([bool $deprecated_echo = true])
-
bool
$deprecated_echo: Remove backwards compat in 2.5
wp_comment_form_unfiltered_html_nonce (line 812)
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.
void
wp_comment_form_unfiltered_html_nonce
()
wp_list_comments (line 1413)
List comments
Used in the comments.php template to list comments for a particular post
void
wp_list_comments
([string|array $args = array()], [array $comments = null])
-
string|array
$args: Formatting options
-
array
$comments: Optional array of comment objects. Defaults to $wp_query->comments