astra_get_queried_post_types()

Function which will return the supported post types from core.


Description

Further processing includes:

  1. Dynamic customizer
  2. Live Search

Return

(array)


Source

File: inc/extras.php

function astra_get_queried_post_types() {
	$queried_post_types = array_keys(
		get_post_types(
			apply_filters(
				'astra_dynamic_get_post_types_query_args',
				array(
					'public'   => true,
					'_builtin' => false,
				)
			)
		)
	);

	$queried_post_types   = array_diff(
		$queried_post_types,
		array(
			'astra-advanced-hook',
			'astra_adv_header',
			'elementor_library',
			'brizy_template',
			'sc_collection',

			'course',
			'lesson',
			'llms_membership',

			'tutor_quiz',
			'tutor_assignments',

			'testimonial',
			'frm_display',
			'mec_esb',
			'mec-events',

			'sfwd-assignment',
			'sfwd-essays',
			'sfwd-transactions',
			'sfwd-certificates',
			'sfwd-quiz',
			'e-landing-page',
		)
	);
	$queried_post_types[] = 'post';
	$queried_post_types[] = 'page';

	return $queried_post_types;
}

Changelog

Changelog
Version Description
4.4.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.