You are here

content_menu.install in Content Menu 7

Same filename and directory in other branches
  1. 8 content_menu.install

Installation hooks for Content Menu module

File

content_menu.install
View source
<?php

/**
 * @file
 * Installation hooks for Content Menu module
 */

/**
 * Implements hook_install().
 */
function content_menu_install() {

  // Set weight to come after core menu.module.
  // Make sure this module's hooks' weight is set to be executed after the core.
  // Menu.module's hooks, so the node add/edit form is already altered by the.
  // Menu.module befor content_menu does its form alterations.
  $weight = db_select('system', 's')
    ->fields('s', array(
    'weight',
  ))
    ->condition('name', 'menu', '=')
    ->execute()
    ->fetchField();
  db_update('system')
    ->fields(array(
    'weight' => $weight + 1,
  ))
    ->condition('name', 'content_menu', '=')
    ->execute();
}

Functions

Namesort descending Description
content_menu_install Implements hook_install().