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: ''


Top ↑

Return Return

(void)


Top ↑

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
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.