Browse: Home / Functions /


learndash_is_item_complete( int|WP_Post|null $post = null,  int|null $user_id = null,  int|null $course_id = null )

Checks if any LearnDash content type is complete.

Description #

Works on lessons or topics, single function for simpler logic in the templates.

Parameters #


(int|WP_Post|null) (Optional) WP_Post object. Default to global $post.

Default value: null


(int|null) (Optional) The user to check against.

Default value: null


(int|null) (Optional) The course to check against (required for reusable content).

Default value: null

Return #

(bool) Returns true if the item is complete otherwise false.

Source #

File: themes/ld30/includes/helpers.php

Changelog #

Version Description
3.0.0 Introduced.