function wysiwyg_profile_break_lock_confirm in Wysiwyg 7.2
Same name and namespace in other branches
- 6.2 wysiwyg.admin.inc \wysiwyg_profile_break_lock_confirm()
Break lock confirmation form.
1 string reference to 'wysiwyg_profile_break_lock_confirm'
- wysiwyg_menu in ./
wysiwyg.module - Implementation of hook_menu().
File
- ./
wysiwyg.admin.inc, line 847 - Integrate Wysiwyg editors into Drupal.
Code
function wysiwyg_profile_break_lock_confirm($form, &$form_state, $profile) {
$form_state['wysiwyg_profile'] =& $profile;
$formats = filter_formats();
$format = $formats[$profile->format];
$form['format'] = array(
'#type' => 'value',
'#value' => $format,
);
if (empty($profile->locked)) {
$form['message']['#markup'] = t('There is no lock on the profile for %name to break.', array(
'%name' => $format->name,
));
return $form;
}
$account = user_load($profile->locked->uid);
return confirm_form($form, t('Are you sure you want to break the lock on the profile for %name?', array(
'%name' => $format->name,
)), 'admin/config/content/wysiwyg', t('By breaking this lock, any unsaved changes made by !user will be lost!.', array(
'!user' => theme('username', array(
'account' => $account,
)),
)), t('Break lock'), t('Cancel'));
}