llms_get_author( array $args = array() )
Retrieve author name, avatar, and bio
Parameters Parameters
- $args
-
(array) (Optional) arguments
Default value: array()
Return Return
(string)
Source Source
File: includes/llms.template.functions.php
/** * Get the placeholder image URL for courses * * @access public * @return string */ function llms_placeholder_img_src() { return apply_filters( 'lifterlms_placeholder_img_src', llms()->plugin_url() . '/assets/images/placeholder.png' ); } /** * Get the placeholder image * * @access public * @return string */ function llms_placeholder_img( $size = 'full' ) { return apply_filters( 'lifterlms_placeholder_img', '<img src="' . llms_placeholder_img_src() . '" alt="placeholder" class="llms-placeholder llms-featured-image wp-post-image" />' ); } /** * Get the featured image. * * @since unknown * @since 7.1.2 Fix bug when the featured image file is not available. * * @access public * * @param int|WP_Post $post_id Post ID or WP_Post object. * @param string|int[] $size Accepts any registered image size name, or an array of width and height values in pixels (in that order). * @return string */ function llms_featured_img( $post_id, $size ) { $img = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), $size ); $html = ''; if ( isset( $img[0] ) ) { $html = '<img src="' . $img[0] . '" alt="' . get_the_title( $post_id ) . '" class="llms-featured-image wp-post-image">'; } /** * Filters the featured image of a given LifterLMS post. * * @since unknown * @since 7.1.2 Added `$post_id` parameter.
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |