WordPress filter hook

get_the_image_args

Defined by Get the Image and fired by 3 plugins in total, running on 9,010+ sites between them.

“Filter Hook for Plugins/Themes”

How to use get_the_image_args

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( 'get_the_image_args', function( $parse_args ) {
	// Change $parse_args here.
	return $parse_args;
}, 10, 1 );

Argument names come from Get the Image's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

3 plugins that fire get_the_image_args

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Get the Image icon Get the Image7,000+ installs apply_filters( 'get_the_image_args', wp_parse_args( $args, $defaults ) ) get-the-image.php:201
  2. Newsletters icon Newsletters2,000+ installs apply_filters( 'get_the_image_args', wp_parse_args( $args, $defaults ) ) vendors/gettheimage.php:158
  3. Chip Get Image icon Chip Get Image10+ installs apply_filters( 'get_the_image_args', $args ) chip-get-image.php:68

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.