Version_History implements Registerable, Standard_Service, Conditional

Document Version History

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

$plugin  : mixed
__construct()  : mixed
Constructor
add_css_class()  : string
Adds a CSS class to the file attachment details and url details.
filter_button_text()  : string
Filters the button text based on version control mode and history.
is_required()  : mixed
{@inheritdoc}
print_version_history_item_template()  : mixed
Print the underscore template for a single item in the version history list
register()  : mixed
{@inheritdoc}
render_file_upload_history()  : mixed
Render the metabox.
save_version_history_data()  : mixed
Saves version history data when the post is saved.

Properties

Methods

__construct()

Constructor

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

add_css_class()

Adds a CSS class to the file attachment details and url details.

public add_css_class(string $css_class) : string
Parameters
$css_class : string

The existing class.

Tags
Return values
string

The modified class.

filter_button_text()

Filters the button text based on version control mode and history.

public filter_button_text(string $button_text, Document $document) : string

Hooks into 'document_library_pro_edit_document_link_button_text'.

Parameters
$button_text : string

The default button text.

$document : Document

The current document object.

Tags
Return values
string

Filtered button text.

is_required()

{@inheritdoc}

public is_required() : mixed
Tags
Return values
mixed

print_version_history_item_template()

Print the underscore template for a single item in the version history list

public print_version_history_item_template() : mixed
Tags
Return values
mixed

register()

{@inheritdoc}

public register() : mixed
Tags
Return values
mixed

render_file_upload_history()

Render the metabox.

public render_file_upload_history(Document $document) : mixed
Parameters
$document : Document
Tags
Return values
mixed

save_version_history_data()

Saves version history data when the post is saved.

public save_version_history_data(Document $document, string $type, array<string|int, mixed> $data) : mixed
Parameters
$document : Document

The document object (already saved core link data).

$type : string

The selected link type ('file', 'url', 'none').

$data : array<string|int, mixed>

The core data saved for the link type.

Tags
Return values
mixed

Search results