AFAIK there is no such function.
There is – or better was, since it is deprecated since 2.8.1; it is of course [sic!] still in use all over the place in core – the function wp_get_sidebars_widgets()
– source – which gives back an array of all sidebars with their widgets. So thinking long term you probably should use this one, although it’s used heavily in core.
Generally, take a look at the source link above. But to mention it here, there are other possibilities, like the globals $_wp_sidebars_widgets
or $sidebars_widgets
. And you can get the same information like this:
get_option('sidebars_widgets', array())
From there, so from the information of the globals $_wp_sidebars_widgets
or $sidebars_widgets
or the sidebar_widhets
option, you have to do some kind of search on the array to receive back the according sidebar ids.
Related Posts:
- Text Widget creates a
- dynamically add scripts to WP_Widget widget() method
- Add the sidebar/widget editor to the post edit screen?
- WP_Widget deprecated error in WordPress V4.3
- What is the quickest way to make a widget?
- Changes in widget customizer not triggering ‘save and publish’
- How do i manually place a widget code
- Remove before_widget / after_widget content from Wp_Widget_Text
- Insert a span inside widget title to give a different color to the second word
- What is the use case for the “Class” parameter in register_sidebar?
- Add a select box to all widgets
- How to avoid widgets added to sidebar on theme activation?
- Big side banners
- How to execute SQL SELECT query and see the results?
- WordPress “include TEMPLATEPATH” or?
- Need help adding additional controls to a custom widget Part 2
- How to add the widgets manually to the sidebar?
- How to check if widget has automatic title
- Display sidebar that created in functions.php
- Create More Widget Holders Like Active Widgets and Inactive Widgets
- Image picker widget
- When you register a sidebar in WordPress, is it possible to choose in what order it appears in the admin
- How to enable “shift-click to edit this widget” functionality on a custom widget?
- WordPress widget args – classname?
- Creating a admin widget for /wp-admin/post.php?
- Custom Tag Cloud widget missing tags
- How the widget can be run by shortcode
- add widgets to dashboard for easy access for clients?
- Adding custom html and standard widgets to sidebar
- Get widget Title from widget id
- Include chat (HTML, js, css) in all pages of WordPress
- Uses Cases for the Calendar Widget
- Wrap all default widget into div tag
- WP_enqueue_script() loads them always in wp_footer()?
- Multilple single-use widgets with the same output callback
- How to filter products using filter products by attribute widget and OR logic between different product attribute types?
- How to add multiple footer widgets?
- WP – Genesis – How to get the content of a widget in php? [closed]
- Can you target a widget_class in a register_sidebar?
- Default widgets assignment – isn’t working
- How to add custom widget above admin_footer
- How to create a ‘single’ category widget for woocommerce plugin [closed]
- Save Multiply Checkboxes in a Widget
- Remove the Inactive Widgets
- what is the best way to add things to a side bar
- Disable a plugin’s widget
- My Custom Widget does not save in sidebar
- How to add urls in html widget in a gravity form? [closed]
- Cannot change footer text?
- What widgets are used on a page? [closed]
- Create Dashboard Widget with form to keep team’s record
- flush_widget_cache is deprecated. Which method should i use instead?
- How not to display an instance of a widget dynamically?
- How to save widget settings on field value change?
- Can’t save widget
- accessing wordpress serialized data outside wp
- How to use variables from widgets in other pages?
- How do I remove lazyloading on the mh-spotlight-widget
- Inject “fake” category to widget/block
- How do I add a small excerpt of a blog post on my Front Page Recent Posts widget?
- WordPress 5.8 : display new widget
- Determine if a specific Gutenberg block is used on pages/posts
- WordPress 5.8 Beta 3 Widget Block: widget_id is undefined when a widget is placed
- Mobile view: how to remove right/left margin from the specific widgets?
- Elementor or WordPress randomly adds the word “array” to my custom widget
- Widget form not displaying for media widgets in WordPress
- Need to remove a piece of copy that appears to be in a sidebar but doesn’t show up
- How to edit wordpress widgets?
- My theme didn’t appear sidebar area
- How to create sidebar from “scratch”?
- Display current tag archive’s name and description in sidebar
- Render repeatable widget fields properly with Backbone.js
- Show modal only to some roles
- Sidebar widgets are over the content in mobile mode, how can I fix it? [closed]
- How to update the options table for a widget
- Script in sidebar blocks other widget’s load
- Adding a trinket.io widget to a post
- Why isn’t this widget displaying one of the icons?
- Paginate recent posts widget
- How to give a File Upload option in wordpress Widget backend?
- Pass widget variable to external function
- Adding Widgets to Reactor Theme (based on Foundation 4)
- Can I use widgets & shortcode if I need to return an array?
- Widget area does not show any contents for specific users in admin interface. How to go about debugging?
- Creating an custom admin page for editing widgets
- Neaten content — different widget or CSS change?
- Show or hide a widget from pages
- Author Link in Recent Posts Widget
- Unique widget id in sidebar
- Taxonomies not showing in WP Dashboard Right Now widget
- trying to Change to wp_register_sidebar_widget
- Custom widgets do not appear in dashboard > appearance > widgets
- How to delete Jetpack Widgets from the Widgets page in admin panel [closed]
- How to customize dynamic_sidebar rendering? [closed]
- Widget does not work with WooCommerce enabled
- How to show WordPress Dashboard Widgets on Frontend?
- how to add multiple menu in custom menu widget?
- How can I add a toggle element into an image box element? [closed]
- Can’t edit the widgets sidebar or footer
- Custom dashboard widget – load style only for added widget