LLMS_Add_On::get_image( string $type = 'addon' )
Get the addon or author image URL for the add-on.
Parameters Parameters
- $type
-
(string) (Optional) Type of image to retrieve. Defaults to 'addon'. Accepts 'addon' or 'author'.
Default value: 'addon'
Return Return
(string)
Source Source
File: includes/models/model.llms.add-on.php
public function get_image( $type = 'addon' ) {
$img = 'author' === $type ? $this->get( 'author' )['image'] : $this->get( 'image' );
if ( ! $img ) {
return '';
}
if ( is_readable( llms()->plugin_path() . '/assets/images/addons/' . basename( $img ) ) ) {
return llms()->plugin_url() . '/assets/images/addons/' . basename( $img );
}
return $img;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.5.0 | Introduced. |