llms_sd_dashboard_widget( string $title, string $content, string $empty_text = '' )
Main function used to display a dashboard widget
Parameters Parameters
- $title
-
(string) (Required) Title of the widget.
- $content
-
(string) (Required) Content (HTML) of the widget body.
- $empty_text
-
(string) (Optional) Content (text) to display if $content is empty.
Default value: ''
Return Return
(void)
Source Source
File: includes/functions/llms.functions.templates.dashboard.widgets.php
function llms_sd_dashboard_widget( $title, $content, $empty_text = '' ) { ?> <div class="llms-sd-widget"> <h4 class="llms-sd-widget-title"><?php echo esc_html( $title ); ?></h4> <?php if ( $content ) : ?> <?php echo $content; ?> <?php elseif ( ! $content && $empty_text ) : ?> <p class="llms-sd-widget-empty"><?php echo esc_html( $empty_text ); ?></p> <?php endif; ?> </div> <?php }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.24.0 | Introduced. |