The “ims_default_opts” filter is used to add or remove option from the default options array. It affects the options when the plugin is installed or settings are reset.

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

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

The hook is located in the image-store/admin/install.php file.


// Apply filter
function modify_ims_default_opts( $options ) {
	$options['my_new_option'] = true;
	return $options; 
add_filter('ims_default_opts', 'modify_ims_default_opts');

Note:  $options is an multidimensional array.

Leave a Reply

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