The “ims_settings_tabs” filter is used to add or remove settings screen tabs like price general, groups, gallery, image, slideshow, payment, checkout and reset.

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

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

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


// Apply filter
function add_ims_settings_tabs( $tabs ) {
	//only allow administrator reset settings
	if( ! current_user_can("adminstrator") )
		unset( $tabs['reset'] ); 
	return $tabs; 
add_filter('ims_settings_tabs', 'add_ims_settings_tabs');

Note:  $tabs is an associative array. The key value must be match a settings key returned by the ims_setting_fields filter for content to display.

Leave a Reply

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