Browse: Home / Hooks /

learndash-topic-status

apply_filters( 'learndash-topic-status',  string $topic_status,  object $topic,  int $course_id )

Filters the status of the topic. Used while listing a topic.


Description #


Parameters #

$topic_status

(string) The topic status. The value can be completed or not-completed.

$topic

(object) The topic object

$course_id

(int) Course ID


Source #

File: themes/ld30/templates/topic/partials/row.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash-topic-status filter.
 */
add_filter(
	'learndash-topic-status',
	function( $topic_status, $topic, $course_id ) {
		// May add any custom logic using $topic_status, $topic, $course_id.

		// Always return $topic_status.
		return $topic_status;
	},
	10,
	3
);
 

Changelog #

Changelog
Version Description
3.0.0 Introduced.