You are here

function amp_block_save in Accelerated Mobile Pages (AMP) 7

Implements hook_block_save().

File

./amp.module, line 818

Code

function amp_block_save($delta = '', $edit = array()) {
  $adsense_blocks = _amp_get_adsense_block_ids();
  $doubleclick_blocks = _amp_get_doubleclick_block_ids();
  if (in_array($delta, $adsense_blocks) || in_array($delta, $doubleclick_blocks)) {
    variable_set($delta . '_width', $edit['width']);
    variable_set($delta . '_height', $edit['height']);
    variable_set($delta . '_data_ad_slot', $edit['data_ad_slot']);
  }
}