You are here

function beautytips_manager_save_custom_tip in BeautyTips 7.2

Same name and namespace in other branches
  1. 8 beautytips_manager/beautytips_manager.module \beautytips_manager_save_custom_tip()
  2. 6.2 beautytips_manager.module \beautytips_manager_save_custom_tip()

Save a singular beautytip.

1 call to beautytips_manager_save_custom_tip()
beautytips_manager_custom_tips_form_submit in ./beautytips_manager.admin.inc
Submission callback for beautytips manager custom tips form.

File

./beautytips_manager.module, line 142
Code related to defining and displaying custom beautytips and styles.

Code

function beautytips_manager_save_custom_tip($tip) {
  $tip = (object) $tip;
  if (isset($tip->id) && $tip->id) {
    drupal_write_record('beautytips_custom_tips', $tip, 'id');
  }
  else {
    drupal_write_record('beautytips_custom_tips', $tip);
  }
  return $tip;
}