learndash-before-section-heading

do_action( 'learndash-before-section-heading',  WP_Post $section,  int $course_id,  int $user_id )

Fires before the section title (outside wrapper).


Description #


Parameters #

$section

(WP_Post) WP_Post object for section.

$course_id

(int) Course ID.

$user_id

(int) User ID.


Source #

File: themes/ld30/templates/lesson/partials/section.php


Examples #

 <?php
/**
 * Example usage for learndash-before-section-heading action.
 */
add_action(
	'learndash-before-section-heading',
	function( $section, $course_id, $user_id ) {
		// May add any custom logic using $section, $course_id, $user_id

		echo '<div>Custom content or markup</div>';
	},
	10,
	3
);
 

Changelog #

Changelog
Version Description
3.0.0 Introduced.