iaffpro_update_media_library

This filter decides if bulk updater should update the image attributes in the media library.

Default value is true and image attributes in the media library are updated by default.

/** 
 * Update image attributes in media library
 * 
 * Set filter iaffpro_update_media_library to false 
 * to disable updating of attributes in media library. 
 * 
 * @since 1.3
 */
if ( apply_filters( 'iaffpro_update_media_library', true ) ) {
	iaffpro_update_image( $image->ID, $attributes, $bulk );
}

Starting with Image Attributes Pro version 4.3, updates to the Media Library can be disabled from the UI directly without the need for this filter. The filter is still available if you wish to do so programmatically.

Note that Image Attributes Pro updates image caption and image description only in the Media Library. To disable Media Library updates for image caption and description, disable updating image caption and description completely, as you can see in the screenshot below.

Image Attributes Pro Configured To Update Attributes In Post HTML Only
Image Attributes Pro configured to update attributes in Post HTML only without updating Media Library.

Example Usage

To prevent the bulk updater from updating image title, caption, description and alt text in your WordPress media library, add the following to the functions.php of the active theme.

/**
 * Prevent Image Attributes Pro bulk updater from updating
 * image attributes in media library
 * 
 * @author Arun Basil Lal
 * @link https://imageattributespro.com/codex/iaffpro_update_media_library/
 */
add_filter( 'iaffpro_update_media_library', '__return_false' );
Was this article helpful?
Yes, thanks! 👍Not really 👎