function patterns_enable_pattern in Patterns 5
Same name and namespace in other branches
- 6.2 patterns.module \patterns_enable_pattern()
- 6 patterns.module \patterns_enable_pattern()
- 7.2 patterns.module \patterns_enable_pattern()
- 7 patterns.module \patterns_enable_pattern()
2 string references to 'patterns_enable_pattern'
- patterns_menu in ./
patterns.module - Implementation of hook_menu().
- patterns_patterns in components/
patterns.inc
File
- ./
patterns.module, line 798 - Enables extremely simple adding/removing features to your site with minimal to no configuration
Code
function patterns_enable_pattern($pid) {
$form['pid'] = array(
'#type' => 'value',
'#value' => $pid,
);
$disclaimer = t('Please be sure to backup your site before running a pattern. Patterns are not guaranteed to be reversable in case they do not execute well or if unforseen side effects occur.');
$pattern = patterns_get_pattern($pid);
return confirm_form($form, t('Proceed with running pattern %pattern?', array(
'%pattern' => $pattern->title,
)), 'admin/build/patterns', $disclaimer);
}