LLMS_Shortcode_Favorites::get_output()
Retrieve the actual content of the shortcode.
Description Description
$atts & $content are both filtered before being passed to get_output() output is filtered so the return of get_output() doesn’t need its own filter.
Return Return
(string)
Source Source
File: includes/shortcodes/class.llms.shortcode.favorites.php
protected function get_output() {
ob_start();
// If we're outputting a "My Favorites" list and we don't have a student output login info.
if ( ! llms_get_student() ) {
printf(
// Translators: 1%$s = Opening anchor tag; %2$s = Closing anchor tag.
esc_html__( 'You must be logged in to view this information. Click %1$shere%2$s to login.', 'lifterlms' ),
'<a href="' . esc_url( llms_get_page_url( 'myaccount' ) ) . '">',
'</a>'
);
} else {
$favorites = $this->get_favorites();
llms_template_my_favorites_loop( get_current_user_id(), $favorites );
}
return ob_get_clean();
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.5.0 | Introduced. |