2

Sorry for the somewhat rambly question, but has anyone ever seen any good piece of documentation, or maybe even a tutorial on the wp.media JS class?

All that i could find documentation-wise is this very brief description on the WordPress codex that seems to be more interested in the PHP and HTML prerequisites than in the actual JS stuff. It also tells you about its own incompleteness right on top of the page. :D

Then there are some tutorials that more or less show the exact coding example from the documentation and some threads here, that aim to solve very specific problems.

All that i could really grasp is that it's a Backbone JS application and that there seem to be much more advanced ways of using it than the piece of crap code that I mended together when trying to add an icon selection input for menu items in my theme.

Maybe the question should be: "Should you still use wp.media in 2023?" I mean it's based on a 13 year old library that doesn't really seem to be used anymore - at least not based on the information i was able to dig up.

But what would be the alternative? Building something totally custom - something REACT based maybe - doesn't really seem like a week well spent, since wp.media at least already exists. And going back to what came before it may even be more stupid.

I'd really like to hear about your opinion on this, since working with wp.media left me somewhat confused.

Cheers, Tim

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.