dozent_course_archive_should_clear_filter()

Returns whether course archive should clear filter


Description

No parameter required, Should clear filter that applied before.


Return

(mixed|void)


Source

File: includes/template-functions.php

	function dozent_course_archive_should_clear_filter() {

		$target_query_arg = apply_filters( 'dozent_course_archive_should_clear_filter_arg', [
			'level',
			'rating',
			'video_duration',
			'sort_by',
		] );

		$current_request_arg = apply_filters( 'dozent_course_archive_should_clear_filter_current_arg', $_REQUEST );
		$current_request_arg = (array) dozent_sanitize_array( $current_request_arg );

		$should_clear_filter = false;
		foreach ( $target_query_arg as $arg ) {
			if ( array_key_exists( $arg, $current_request_arg ) ) {
				$should_clear_filter = true;
			}
		}

		return apply_filters( 'dozent_course_archive_should_clear_filter', $should_clear_filter );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.