WordPress filter hook
list_images
Fired by 3 WordPress plugins, running on 6,040+ sites between them.
How to use list_images
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'list_images', function( $value, $cpt ) {
// Change $value here.
return $value;
}, 10, 2 );Argument names come from Multi Image Metabox's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
3 plugins that fire list_images
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Multi Image Metabox6,000+ installs
apply_filters( 'list_images', array( 'image1' => '_image1', 'image2' => '_image2', 'image3' => '_image3', 'image4' => '_image4', 'image5' => '_image5', 'image6' => '_image6', 'image7' => '_image7', 'image8' => '_image8' ), $cpt )multi-image-metabox.php:25 -
WP Real Estate30+ installs
apply_filters( 'list_images', $arrayval, $ptyimg )library/property-images-metabox.php:9 -
Nic Image Gallery10+ installs
apply_filters( 'list_images', array( 'image1' => '_image1', 'image2' => '_image2', 'image3' => '_image3', 'image4' => '_image4' ), 'false' )nic-image-gallery.php:233
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.