You are here

function patterns_enable_pattern_submit in Patterns 5

Same name and namespace in other branches
  1. 6.2 patterns.module \patterns_enable_pattern_submit()
  2. 6 patterns.module \patterns_enable_pattern_submit()
  3. 7.2 patterns.module \patterns_enable_pattern_submit()
  4. 7 patterns.module \patterns_enable_pattern_submit()

File

./patterns.module, line 820
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function patterns_enable_pattern_submit($form_id, $form_values) {
  $pid = $form_values['pid'];
  patterns_load();
  $pattern = patterns_get_pattern($pid);
  if (patterns_execute_pattern($pattern, false, true)) {
    return 'admin/build/patterns';
  }
}