ImageAttachment
in package
ImageAttachment class.
Table of Contents
- $id : int
- Attachment ID.
- $object_id : int
- Object attached to.
- __construct() : mixed
- Constructor.
- update_alt_text() : mixed
- Update attachment alt text.
- update_name() : mixed
- Update attachment name.
- upload_image_from_src() : mixed
- Upload an attachment file.
Properties
$id
Attachment ID.
public
int
$id
= 0
$object_id
Object attached to.
public
int
$object_id
= 0
Methods
__construct()
Constructor.
public
__construct(int $id, int $object_id) : mixed
Parameters
- $id : int
-
Attachment ID.
- $object_id : int
-
Object ID.
Return values
mixed —update_alt_text()
Update attachment alt text.
public
update_alt_text(string $text) : mixed
Parameters
- $text : string
-
Text to set.
Return values
mixed —update_name()
Update attachment name.
public
update_name(string $text) : mixed
Parameters
- $text : string
-
Text to set.
Return values
mixed —upload_image_from_src()
Upload an attachment file.
public
upload_image_from_src(string $src) : mixed
Parameters
- $src : string
-
URL to file.