Document_Expiry implements Registerable, Standard_Service, Conditional

Document Expiry post setting

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
Standard_Service
Conditional

Table of Contents

is_required()  : mixed
{@inheritdoc}
register()  : mixed
{@inheritdoc}
render()  : mixed
Render the metabox.
save()  : mixed
Save the metabox values
generate_timestamp()  : string
Generate a timestamp from the given date and time values.
touch_time()  : mixed
Adaptation of the touch_time function from WordPress core.

Methods

is_required()

{@inheritdoc}

public is_required() : mixed
Return values
mixed

register()

{@inheritdoc}

public register() : mixed
Return values
mixed

render()

Render the metabox.

public render(WP_Post $post) : mixed
Parameters
$post : WP_Post
Return values
mixed

save()

Save the metabox values

public save(mixed $post_id) : mixed
Parameters
$post_id : mixed
Return values
mixed

generate_timestamp()

Generate a timestamp from the given date and time values.

private generate_timestamp(int $aa, int $mm, int $jj, int $hh, int $mn) : string
Parameters
$aa : int
$mm : int
$jj : int
$hh : int
$mn : int
Return values
string

touch_time()

Adaptation of the touch_time function from WordPress core.

private touch_time(int $document_id, int $tab_index) : mixed

We need custom HTML ID's to prevent conflicts with the scheduled publish date in the post editor.

Prints out HTML form date elements.

Parameters
$document_id : int

The post ID.

$tab_index : int

The tabindex attribute to add. Default 0.

Tags
global

WP_Locale $wp_locale WordPress date and time locale object.

Return values
mixed

Search results