Set weight on a module


**
 * Implements hook_install().
 */
function MY_MODULE_install() {
	
  // Set module weight in order to invoke module after other modules.
  db_update('system')
  ->fields(array('weight' => 100))
  ->condition('name', 'MY_MODULE')
  ->execute();
}

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.