PostTypeLogs
in package

Tags
since
1.14.0

Table of Contents

$commentSlug  : string
$commentType  : string
$postType  : string
__construct()  : mixed
addLog()  : int|false
getLogs()  : array<string|int, WP_Comment>
hideFromComments()  : mixed
hideFromFeed()  : string
startHidingFromComments()  : mixed
stopHidingFromComments()  : mixed
addHooks()  : mixed

Properties

$commentSlug

protected string $commentSlug = ''
Tags
example

'booking_log'

$commentType

protected string $commentType = ''
Tags
example

'mpa_booking_log'

$postType

protected string $postType = ''
Tags
example

'mpa_booking'

Methods

__construct()

public __construct(string $postType) : mixed
Parameters
$postType : string
Return values
mixed

addLog()

public addLog(int $entityId, string $message[, int|null $authorId = null ]) : int|false
Parameters
$entityId : int
$message : string
$authorId : int|null = null

Optional. Current logged in user ID by default.

Return values
int|false

The new comment's ID on success, false on failure.

getLogs()

public getLogs(int $entityId) : array<string|int, WP_Comment>
Parameters
$entityId : int
Return values
array<string|int, WP_Comment>

Logs in descending order.

hideFromComments()

public hideFromComments(WP_Comment_Query $query) : mixed
Parameters
$query : WP_Comment_Query
Tags
access

protected

Return values
mixed

hideFromFeed()

public hideFromFeed(string $where) : string
Parameters
$where : string
Tags
access

protected

global

wpdb $wpdb

Return values
string

startHidingFromComments()

public startHidingFromComments() : mixed
Tags
access

protected

Return values
mixed

stopHidingFromComments()

public stopHidingFromComments() : mixed
Tags
access

protected

Return values
mixed

addHooks()

protected addHooks() : mixed
Return values
mixed

Search results