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:

functions.php
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.

  1. Visual Bible Verse of the Day Widget icon Visual Bible Verse of the Day Widget900+ installs apply_filters( 'widget_width', $instance['width'] ) vv-widget.php:23
  2. WP Youtube channel gallery icon WP Youtube channel gallery100+ installs apply_filters( 'widget_width', $instance['width'] ) wp-youtube-list-channel.php:173
  3. Tag Cloud Canvas icon Tag Cloud Canvas100+ installs apply_filters( 'widget_width', $instance['width'] ) tag-cloud-canvas.php:63
  4. HORIZONTAL SLIDER icon HORIZONTAL SLIDER50+ installs apply_filters( 'widget_width', $instance['width'] ) init.php:146
  5. PoolParty Thesaurus icon PoolParty Thesaurus10+ installs apply_filters( 'widget_width', $aAtts['width'] ) classes/PPThesaurusTemplate.class.php:165
  6. Related King Pro icon Related King Pro10+ installs apply_filters( 'widget_width', $instance['width'] ) includes/widget.php:18
  7. Social Network Links by gol.li icon Social Network Links by gol.li10+ installs apply_filters( 'widget_width', $instance['width'] ) golli-share.php:38
  8. Loptix icon LoptixFewer than 10 installs apply_filters( 'widget_width', $instance['width'] ) loptix.php:49
  9. ObfuscaTOR icon 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.