Consider this scenario:
I enqueued some scripts in my custom theme. Then I set off to building a plugin that I want to be used only with that one theme. I want to enqueue other scripts in my plugin that depend on scripts enqueued in the theme. The standard way of declaring script dependencies in wordpress is passing an array of dependencies to
wp_enqueue_script('tagsinput-scripts', plugin_dir_url( __FILE__ ) . 'js/tagsinput/bootstrap-tagsinput.min.js', array('bootstrap-js'), '130215', false);
would not be enqueued until
bootstrap-js is enqueued.
Imagine that the script above was enqueued by my plugin with
admin_enqueue_scripts action hook, while
bootstrap-js was enqueued in the theme with the
wp_enqueue_scripts action hook.
Can the dependency between
bootstrap-js be properly resolved by Wordpress in this scenario when the two scripts where enqueued using different action hooks?