wp_get_sidebars_widgets()
is very usefull to get infos about widgets in a sidebar. However, the WP codex states it’s a private function, not to be used for theme development… which is specifically my case. What are the alternatives? How to get widgets infos without it? I guess with dynamic_sidebar()
and some PHP but I don’t see how, really.
What I want to get is:
- the widgets ids (which informs me what widget has been used).
- the widgets data entered by the user in the form.
Thanks!
Ok, so I found a solution, but it looks like a hack. If someone knows something better…
My sidebar’s id is ‘homepage’ and all my widget ids start with my prefix,
nd_home_
: