WordPress filter hook
widget_width
Fired by 9 WordPress plugins, running on 1,180+ sites between them.
How to use widget_width
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'widget_width', function( $instance ) {
// Change $instance here.
return $instance;
}, 10, 1 );Argument names come from Visual Bible Verse of the Day Widget's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
9 plugins that fire widget_width
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Visual Bible Verse of the Day Widget900+ installs
apply_filters( 'widget_width', $instance['width'] )vv-widget.php:23 -
WP Youtube channel gallery100+ installs
apply_filters( 'widget_width', $instance['width'] )wp-youtube-list-channel.php:173 -
Tag Cloud Canvas100+ installs
apply_filters( 'widget_width', $instance['width'] )tag-cloud-canvas.php:63 -
HORIZONTAL SLIDER50+ installs
apply_filters( 'widget_width', $instance['width'] )init.php:146 -
PoolParty Thesaurus10+ installs
apply_filters( 'widget_width', $aAtts['width'] )classes/PPThesaurusTemplate.class.php:165 -
Related King Pro10+ installs
apply_filters( 'widget_width', $instance['width'] )includes/widget.php:18 -
Social Network Links by gol.li10+ installs
apply_filters( 'widget_width', $instance['width'] )golli-share.php:38 -
LoptixFewer than 10 installs
apply_filters( 'widget_width', $instance['width'] )loptix.php:49 -
ObfuscaTORFewer than 10 installs
apply_filters( 'widget_width', $instance['width'] )obfuscaTOR.php:290
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.