Image
in package
Functionality for image display.
Renders image exif metadata. Maybe renders a download button.
Tags
Table of Contents
Constants
- DOWNLOAD_BUTTON = 'download.php'
- Image download button container partial.
- EXIF_CONTAINER = 'exif.php'
- EXIF metadata container partial.
Properties
- $download_button_path : string
- The fully qualified path to the image download button container partial.
- $exif_container_path : string
- The fully qualified path to the exif metadata container partial.
- $instances : array<string|int, object>
- The array of instances of this class and sub-classes.
Methods
- get_instance() : object
- Creates and/or returns the instance of this class.
- image_metadata() : void
- Render image EXIF metadata.
- maybe_download_button() : void
- Render image download button.
- __construct() : void
- Initialise the class and set its properties.
Constants
DOWNLOAD_BUTTON
Image download button container partial.
protected
string
DOWNLOAD_BUTTON
= 'download.php'
Tags
EXIF_CONTAINER
EXIF metadata container partial.
protected
string
EXIF_CONTAINER
= 'exif.php'
Tags
Properties
$download_button_path
The fully qualified path to the image download button container partial.
protected
string
$download_button_path
Tags
$exif_container_path
The fully qualified path to the exif metadata container partial.
protected
string
$exif_container_path
Tags
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
Methods
get_instance()
Creates and/or returns the instance of this class.
public
static get_instance() : object
Tags
Return values
object —The instance of this class.
image_metadata()
Render image EXIF metadata.
public
image_metadata(int $attachment_id) : void
Parameters
- $attachment_id : int
-
The id of the attachment.
Tags
maybe_download_button()
Render image download button.
public
maybe_download_button(int $attachment_id) : void
Only available to logged in users.
Parameters
- $attachment_id : int
-
The id of the attachment.
Tags
__construct()
Initialise the class and set its properties.
protected
__construct() : void