You are here

function patterns_db_publish_pattern in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/ \patterns_db_publish_pattern()

Sets the flag public to FALSE in the database for the pattern with the specified pattern id.


mixed $pattern A pattern object, an array representing: the pattern object, a numeric id or alphanumeric name of the pattern as it is in the database

Return value

Bool TRUE, if successful

3 calls to patterns_db_publish_pattern()
drush_patterns_publish in ./
patterns publish command callback.
patterns_d2d_push_patterns_server in patterns_d2d/includes/
patterns_publish_pattern_submit in includes/
Executes patterns_db_publish_pattern($pid) and display a message.


includes/, line 480
Retrieve, save, and remove patterns from the database.


function patterns_db_publish_pattern($pattern) {
  $pattern = _patterns_db_get_pattern($pattern);
  if (!$pattern) {
    return FALSE;
  $pid = $pattern->pid;
  return db_query("UPDATE {patterns} SET public = 1 WHERE pid = :pid", array(
    'pid' => $pid,