You are here

function word_link_save in Word Link 7.2

Save word.

Parameters

array $word: Word array.

Return value

mixed If save failed, returns FALSE. If it succeeded, returns word object.

7 calls to word_link_save()
word_link_action_add_word_link in ./word_link.rules.inc
Add Word Link action.
word_link_add_form_save_submit in ./word_link.admin.inc
Submit for save action.
word_link_disable_invalid_word_action in ./word_link.actions.inc
Action function.
word_link_disable_words in ./word_link.module
Disable words and set message.
word_link_exchange_import_from_file in modules/word_link_exchange/word_link_exchange.module
Import links from file to DB.

... See full list

File

./word_link.module, line 667

Code

function word_link_save(&$word) {
  $word = (object) $word;
  $insert = isset($word->id) ? 'id' : array();
  $result = drupal_write_record('word_link', $word, $insert);
  return $result ? $word : $result;
}