function by_email
selects all comments from a given email address
static
array
by_email
([string $email = ''])
-
string
$email: an email address
function by_ip
selects all comments from a given IP address
static
array
by_ip
([string $ip = ''])
-
string
$ip: an IP address
function by_name
selects all comments from a given name
static
array
by_name
([string $name = ''])
Returns all comments for a supplied post ID
static
array
by_post_id
(post_id $post_id)
-
post_id
$post_id: ID of the post
function by_slug
select all comments for a given post slug
static
array
by_slug
([string $slug = ''])
-
string
$slug: a post slug
function by_status
select all comments of a given status
static
array
by_status
([int $status = 0])
-
int
$status: a status value
function by_url
select all comments from an author's URL
static
array
by_url
([string $url = ''])
static count_by_email
returns the number of comments attributed ot the specified email
static
int
count_by_email
([string $email = ''], [mixed $status = Comment::STATUS_APPROVED])
-
string
$email: an email address
-
mixed
$status: A comment status value, or FALSE to not filter on status (default: Comment::STATUS_APPROVED)
static count_by_id
returns the number of comments attached to the specified post
static
int
count_by_id
([int $id = 0], [mixed $status = Comment::STATUS_APPROVED])
-
int
$id: a post ID
-
mixed
$status: A comment status value, or FALSE to not filter on status(default: Comment::STATUS_APPROVED)
static count_by_ip
returns the number of comments from the specified IP address
static
int
count_by_ip
([string $ip = ''], [mixed $status = Comment::STATUS_APPROVED])
-
string
$ip: an IP address
-
mixed
$status: A comment status value, or FALSE to not filter on status (default: Comment::STATUS_APPROVED)
static count_by_name
returns the number of comments attributed to the specified name
static
int
count_by_name
([string $name = ''], [mixed $status = Comment::STATUS_APPROVED])
-
string
$name: a commenter's name
-
mixed
$status: A comment status value, or FALSE to not filter on status (default: Comment::STATUS_APPROVED)
static count_by_slug
returns the number of comments attached to the specified post
static
int
count_by_slug
([string $slug = ''], [mixed $status = Comment::STATUS_APPROVED])
-
string
$slug: a post slug
-
mixed
$status: A comment status value, or FALSE to not filter on status (default: Comment::STATUS_APPROVED)
static count_by_url
returns the number of comments attributed to the specified URL
static
int
count_by_url
([string $url = ''], [mixed $status = Comment::STATUS_APPROVED])
-
string
$url: a URL
-
mixed
$status: a comment status value, or FALSE to not filter on status (default: Comment::STATUS_APPROVED)
static count_total
returns the number of comments based on the specified status and type
static
int
count_total
([mixed $status = Comment::STATUS_APPROVED], [mixed $type = Comment::COMMENT])
-
mixed
$status: A comment status value, or FALSE to not filter on status (default: Comment::STATUS_APPROVED)
-
mixed
$type: A comment type value, or FALSE to not filter on type (default: Comment::COMMENT)
static delete_by_status
delete all the comments and commentinfo for comments with this status
static
void
delete_by_status
(mixed $status)
-
mixed
$status: a comment status ID or name
Deletes comments from the database
static
void
delete_these
(mixed $comments)
-
mixed
$comments: Comments to delete. An array of or a single ID/Comment object
function get
Returns requested comments
static
array
get
([array $paramarray = array()])
-
array
$paramarray: An associated array of parameters, or a querystring
Changes the status of comments
static
void
moderate_these
(mixed $comments, [ $status = Comment::STATUS_UNAPPROVED])
-
mixed
$comments: Comment IDs to moderate. May be a single ID, or an array of IDs
-
$status
Parses a search string for status, type, author, and tag keywords. Returns an associative array which can be passed to Comments::get(). If multiple authors, statuses, or types are specified, we assume an implicit OR such that (e.g.) any author that matches would be returned.
static
array
search_to_get
(string $search_string)
-
string
$search_string: The search string
static set
returns the number of document
static
int
set
(array $params)
function delete
Deletes all comments in this object
void
delete
()
function only
returns all of the comments from the current Comments object of the specified type
$tb=
$comments->only( 'trackbacks' )
array
only
([ $what = 'approved'])
function __get
Implements custom object properties
mixed
__get
(string $name)
-
string
$name: Name of property to return
Inherited Methods
Inherited From ArrayObject (Internal Class)
constructor __construct ( $array )
append ( $value )
asort ( )
count ( )
exchangeArray ( $array )
getArrayCopy ( )
getFlags ( )
getIterator ( )
getIteratorClass ( )
ksort ( )
natcasesort ( )
natsort ( )
offsetExists ( $index )
offsetGet ( $index )
offsetSet ( $index, $newval )
offsetUnset ( $index )
setFlags ( $flags )
setIteratorClass ( $iteratorClass )
uasort ( $cmp_function )
uksort ( $cmp_function )