[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> comment.php (summary)

WordPress Comment Administration API.

File Size: 213 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  comment_exists()
  edit_comment()
  get_comment_to_edit()
  get_pending_comments_num()
  floated_admin_avatar()
  enqueue_comment_hotkeys_js()
  comment_footer_die()

Functions
Functions that are not part of a class:

comment_exists( $comment_author, $comment_date, $timezone = 'blog' )   X-Ref
Determine if a comment exists based on author and date.

For best performance, use `$timezone = 'gmt'`, which queries a field that is properly indexed. The default value
for `$timezone` is 'blog' for legacy reasons.

return: mixed Comment post ID on success.
since: 2.0.0
since: 4.4.0 Added the `$timezone` parameter.
param: string $comment_author Author of the comment.
param: string $comment_date   Date of the comment.
param: string $timezone       Timezone. Accepts 'blog' or 'gmt'. Default 'blog'.

edit_comment()   X-Ref
Update a comment with values provided in $_POST.

since: 2.0.0

get_comment_to_edit( $id )   X-Ref
Returns a WP_Comment object based on comment ID.

return: WP_Comment|false Comment if found. False on failure.
since: 2.0.0
param: int $id ID of comment to retrieve.

get_pending_comments_num( $post_id )   X-Ref
Get the number of pending comments on a post or posts

return: int|array Either a single Posts pending comments as an int or an array of ints keyed on the Post IDs
since: 2.3.0
param: int|array $post_id Either a single Post ID or an array of Post IDs

floated_admin_avatar( $name )   X-Ref
Add avatars to relevant places in admin, or try to.

return: string Avatar with Admin name.
since: 2.5.0
param: string $name User name.

enqueue_comment_hotkeys_js()   X-Ref

since: 2.7.0

comment_footer_die( $msg )   X-Ref
Display error message at bottom of comments.

param: string $msg Error Message. Assumed to contain HTML and be sanitized.



Generated: Sun Sep 15 01:00:03 2019 Cross-referenced by PHPXref 0.7.1