Browse: Home / Hooks /

learndash_focus_header_element

apply_filters( 'learndash_focus_header_element',  string $header_element,  array $header,  int $course_id,  int $user_id )

Filters Focus mode Header element markup.


Description #


Parameters #

$header_element

(string) Focus mode header element markup.

$header

(array) Array of header element details keyed logo_alt, logo_url, text, text_url.

$course_id

(int) Course ID.

$user_id

(int) User ID.


Source #

File: themes/ld30/templates/focus/masthead.php


Examples #

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

 <?php
/**
 * Example usage for learndash_focus_header_element filter.
 */
add_filter(
	'learndash_focus_header_element',
	function( $header_element = '', $header = array(), $course_id = 0, $user_id = 0 ) {
		// Here provide some logic to modify $header_element. Adding 'rel', 'target' attributes etc.

		// Always return $header_element;
		return $header_element;
	},
	30,
	4
);
 

Changelog #

Changelog
Version Description
3.1.0 Introduced.