Browse: Home / Functions /

learndash_status_icon

learndash_status_icon( string $status = 'not-completed',  string $post_type = null,  array $args = null,  boolean $echo = false )

Gets or prints the LearnDash status icon.


Description #

Output the status icon for a course element. Simplifies template logic.


Parameters #

$status

(string) (Optional) The current item's status, either not-completed or completed (based on current logic and labeling).

Default value: 'not-completed'

$post_type

(string) (Optional) What post type we're checking against so this can be used for courses, lessons, topics, and quizzes.

Default value: null

$args

(array) (Optional) The arguments to get the status icon.

Default value: null

$echo

(boolean) (Optional) True to print the output and false to return the output.

Default value: false


Return #

(void|string) Returns the status icon markup if echo is false.


Source #

File: themes/ld30/includes/helpers.php


Changelog #

Changelog
Version Description
3.0.0 Introduced.