Documentation

CoverImage
in package
implements IMetadata Uses UtilsProvider

Implements a cover image for root folder, collections, galleries and normal folders.

Table of Contents

Interfaces

IMetadata
Metadata content of a folder. The metadata can be changed in the arrow-down icon in the folders sidebar toolbar. To handle metadata for folders you can use the add_media_folder_meta function.

Methods

__construct()  : mixed
C'tor.
ajax_get_attachment_by_url()  : mixed
Get attachment id by URL via admin-ajax.php.
content()  : string
Generate content for meta box.
delete_attachment()  : mixed
An attachment gets deleted, so delete meta, too.
getAttachmentID()  : int
Get attachment ID if cover image is set.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
isDisabled()  : mixed
WP Media Picker is not compatible with Thrive Quiz Builder so disable this meta in this view.
save()  : array<string|int, string>
Save content in meta box.
scripts()  : mixed
Enqueue scripts.

Methods

__construct()

C'tor.

public __construct() : mixed

content()

Generate content for meta box.

public content(string $content, IFolder $folder) : string
Parameters
$content : string
$folder : IFolder
Return values
string

delete_attachment()

An attachment gets deleted, so delete meta, too.

public delete_attachment(int $postid) : mixed
Parameters
$postid : int

getAttachmentID()

Get attachment ID if cover image is set.

public getAttachmentID(int $fid) : int
Parameters
$fid : int
Return values
int

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

isDisabled()

WP Media Picker is not compatible with Thrive Quiz Builder so disable this meta in this view.

public isDisabled() : mixed

save()

Save content in meta box.

public save(array<string|int, string> $response, IFolder $folder, WP_REST_Request $request) : array<string|int, string>
Parameters
$response : array<string|int, string>
$folder : IFolder
$request : WP_REST_Request
Return values
array<string|int, string>

        
On this page

Search results