Closed ericandrewlewis closed 10 years ago
I think it's probably better if the original function can still return a normal select element with an arg that switches to using a JS helper, with that arg set to true if you're in the admin and the count of users is over some limit. I implemented that in my experimental patches on the ticket.
I don't mind merging now, but given that we're aiming for a patch and this can be used by plugins and on the front end, I'd rather not wander too far from back compat.
Also - how does i18n work with Select2? I haven't investigated, just curious.
Helen said
probably better if the original function can still return a normal select element with an arg that switches to using a JS helper
:bulb: That makes a lot of sense - missed that first rung; that makes back-compat easy.
how does i18n work with Select2?
Select2 has drop-ins like these which are expected to be included after Select2 core to override defaults. We can do something similar, but make : localize strings server-side and localize core manually via WP_Scripts->add_data()
Let's hold on merging until we're happy with this. I'll add a few more commits for i18n and back-compat.
This has been a good first run - I think we're merge ready with intent to iterate.
Queries users in a dumb fashion at the moment (no preference for users that write a lot), but does scale with search and basic pagination.