soflyy / breakdance-bugs

Bug reports from Breakdance users.
38 stars 6 forks source link

Reusable Dependencies not retrieving #1029

Open bakkbone opened 6 months ago

bakkbone commented 6 months ago

See comment below with solution


Steps to reproduce:

add_filter( 'breakdance_reusable_dependencies_urls', [$this, 'my_function'], PHP_INT_MAX ); function gravitydance_gf_styles($urls) { $urls['my_url'] = plugins_url('/assets/js/script.js', 'myplugin/myplugin.php'); return $urls; }

Result: image image

bakkbone commented 6 months ago

So it turns out it's the underscore in my dependency key - perhaps the docs need to be updated to explain that the key can't contain an underscore (I'm assuming you explode the string by the underscores to get the key)