You are here

function patterns_unpublish_pattern in Patterns 6

Same name and namespace in other branches
  1. 6.2 patterns.module \patterns_unpublish_pattern()
  2. 7.2 includes/servers.inc \patterns_unpublish_pattern()
  3. 7 includes/servers.inc \patterns_unpublish_pattern()
1 string reference to 'patterns_unpublish_pattern'
patterns_menu in ./patterns.module
Implementation of hook_menu().

File

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

Code

function patterns_unpublish_pattern($pid) {
  if (is_numeric($pid)) {
    $result = db_query("UPDATE {patterns} SET public = 0 WHERE pid = %d", $pid);
  }
  drupal_set_message('Pattern unpublished.');
  drupal_goto('admin/build/patterns');
}