Assets::should_enqueue_admin()
Load assets on the add or edit pages of the block editor only.
Return
(bool) Whether to load assets.
Source
File: src/Tribe/Assets.php
public function should_enqueue_admin() {
if ( ! is_admin() ) {
return false;
}
if ( ! get_current_screen()->is_block_editor ) {
return false;
}
if ( ! tribe( 'admin.helpers' )->is_post_type_screen() ) {
return;
}
return true;
}
Changelog
| Version | Description |
|---|---|
| 1.8.3 | Introduced. |