You are here

function hide_submit_install in Hide submit button 6

Same name and namespace in other branches
  1. 5 hide_submit.install \hide_submit_install()
  2. 7 hide_submit.install \hide_submit_install()

Implement hook install

File

./hide_submit.install, line 15
Hide the submit button after clicked to prevent/reduce duplicate postings.

Code

function hide_submit_install() {

  // This change allow most modules to have their init() hook
  // implementation called before hide_submit's one. This take
  // sense for modules that play with theme, like themekey or
  // section, so they can initialize the current theme before
  // hide_submit.
  update_sql("UPDATE {system} SET weight = 10 WHERE type = 'module' AND name = 'hide_submit'");
  drupal_set_message(st('Hide submit module installed.'));
}