Assets::enqueue_views_posttype_assets()

Checks for specified custom post types on single post pages and enqueues assets if true.

Contents


Source

File: src/Conference/Views/Assets.php

	public function enqueue_views_posttype_assets() {
		if ( ! is_single() ) {
			return;
		}

		$post_types = array(
			Plugin::SESSION_POSTTYPE,
			Plugin::SPEAKER_POSTTYPE,
			Plugin::SPONSOR_POSTTYPE,
		);

		if ( ! in_array( get_post_type(), $post_types ) ) {
			return;
		}

		Stellar_Assets::instance()->enqueue_group( 'event-schedule-manager-views' );
	}

Top ↑

Changelog

Changelog
Version Description
1.0.0 Introduced.