ims_color_opts

Description

The “ims_color_opts” filter is used to add or remove image color options. Use the hook along with ims_apply_color_filter to obtain the desired color results.

A plugin (or theme) can modify the array with the code:

<?php add_filter( 'ims_color_opts', 'filter_function_name' ); ?>

The hook is located in the image-store/_inc/core.php file.

Example

// Apply filter
function add_ims_color_opts( $colors ) {
$colors['ims_green'] = __( 'Green tone' ); // add a green tone color
return $colors; 
}
add_filter('ims_color_opts', 'add_ims_color_opts');

Note: $colors is an associative array, key values must match a color filters key in the ims_color_filters option.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *