Comments implements Registerable, Service

Filter the comments output to disable it if set

Tags
author

Barn2 Plugins info@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
Service

Table of Contents

$plugin  : mixed
__construct()  : mixed
Constructor.
comments_open()  : bool
Disables the comments output if our setting is not active
comments_template()  : string
Outputs a blank comments template if necessary
hide_comments()  : array<string|int, mixed>
Changes the comments_open() state
register()  : mixed
{@inheritdoc}
is_comments_active()  : bool
Determines if comments should be active and displayed

Properties

Methods

__construct()

Constructor.

public __construct(Plugin $plugin) : mixed
Parameters
$plugin : Plugin
Return values
mixed

comments_open()

Disables the comments output if our setting is not active

public comments_open(bool $open, int $post_id) : bool
Parameters
$open : bool
$post_id : int
Return values
bool

$open

comments_template()

Outputs a blank comments template if necessary

public comments_template(string $template) : string
Parameters
$template : string
Return values
string

$template

hide_comments()

Changes the comments_open() state

public hide_comments(array<string|int, mixed> $comments, int $post_id) : array<string|int, mixed>
Parameters
$comments : array<string|int, mixed>
$post_id : int
Return values
array<string|int, mixed>

$comments

register()

{@inheritdoc}

public register() : mixed
Return values
mixed

is_comments_active()

Determines if comments should be active and displayed

private is_comments_active() : bool
Return values
bool

Search results