Tribe__Tickets__Assets::should_enqueue_admin()
Check if we should add the Admin Assets into a Page
Return
(bool)
Source
File: src/Tribe/Assets.php
public function should_enqueue_admin() {
global $post;
/**
* Filter the array of module names.
*
* @since 4.6
*
* @param array the array of modules
*
* @see event-tickets/src/Tribe/Tickets.php->modules()
*/
$modules = Tribe__Tickets__Tickets::modules();
// For the metabox
return ! empty( $post ) && ! empty( $modules ) && in_array( $post->post_type, tribe( 'tickets.main' )->post_types() );
}
Changelog
| Version | Description |
|---|---|
| 5.2.1 | Always enqueue scripts for Ticket settings page. |
| 4.6 | Introduced. |