learndash_course_info_query_args

apply_filters( 'learndash_course_info_query_args',  array $courses_registered_query_args,  string $context,  int $user_id,  array $atts )

Filters query arguments for courses registered.


Description #


Parameters #

$courses_registered_query_args

(array) An array of courses registered query arguments.

$context

(string) The context of course info.

$user_id

(int) User ID.

$atts

(array) An array of shortcode attributes.


Source #

File: includes/class-ld-lms.php


Examples #

 <?php
/**
 * Example usage for learndash_course_info_query_args filter.
 */
add_filter(
	'learndash_course_info_query_args',
	function( $courses_registered_query_args, $context, $user_id, $atts ) {
		// May add any custom logic using $courses_registered_query_args, $context, $user_id, $atts.

		// Always return $courses_registered_query_args.
		return $courses_registered_query_args;
	},
	10,
	4
);