LLMS_User_Achievement::get_image_html( array $size = array() )
Retrieve the HTML <img>
for the achievement.
Parameters Parameters
- $size
-
(array) (Optional) Dimensions of the image to return passed as [ width, height ] (in pixels).
Default value: array()
Return Return
(string)
Source Source
File: includes/models/model.llms.user.achievement.php
public function get_image_html( $size = array() ) { /** * Filters the HTML used to display an achievement image. * * @since 3.14.0 * @since 6.0.0 Added `$size` parameter. * * @param string $html Image HTML. * @param LLMS_User_Achievement $achievement The achievement object. * @param int[] $size Dimensions of the image to return passed as [ width, height ] (in pixels). */ return apply_filters( 'llms_achievement_get_image_html', sprintf( '<img alt="%1$s" class="llms-achievement-img" src="%2$s">', esc_attr( $this->get( 'title' ) ), $this->get_image( $size ) ), $this, $size ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.14.0 | Introduced. |