Technical Docs

Search Documentation

Function: tribe_asset

Shortcut for Tribe__Assets::register(), include a single asset

Located at src/functions/template-tags/general.php (Line: 600)

Parameters summary

(object) $origin The main Object for the plugin you are enqueueing the script/style for
(string) $slug Slug to save the asset
(string) $file Which file will be loaded, either CSS or JS
(array) $deps Dependencies
(string) $action A WordPress Action, needs to happen after: <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code>
(array) $arguments Look at <code>Tribe__Assets::register()</code> for more info

Return value summary

(array) Which Assets was registered


array tribe_asset ( object $origin, string $slug, string $file, array $deps = array(), string $action = null, array $arguments = array() )