You are here

function wysiwyg_ui_profile_cache_set in Wysiwyg 7.2

Same name and namespace in other branches
  1. 6.2 wysiwyg.module \wysiwyg_ui_profile_cache_set()

Specialized cache function to add a profile to the editing cache.

1 call to wysiwyg_ui_profile_cache_set()
wysiwyg_profile_overview_submit in ./wysiwyg.admin.inc
Submit callback for Wysiwyg profile overview form.

File

./wysiwyg.module, line 948

Code

function wysiwyg_ui_profile_cache_set(&$profile) {
  if (!empty($profile->locked)) {
    drupal_set_message(t('Changes can not be made to a locked profile.'), 'error');
    return;
  }
  $profile->changed = TRUE;
  if (module_exists('ctools')) {
    ctools_include('object-cache');
    ctools_object_cache_set('wysiwyg_profile', $profile->name, $profile);
  }
  else {
    cache_set('wysiwyg_profile:' . $profile->name, $profile);
  }
}