You are here

function google_plusone_update_7001 in Google Plus One Button | Google+ Badge 7

'count' parameter has been deprecated in favor of 'annotation' in the Google +1 API Updating variables according to the new API.

File

./google_plusone.install, line 39
Enable and uninstall functions for the Google Plus One module.

Code

function google_plusone_update_7001() {

  // Updating settings of the G+ button for the node
  $button_settings = variable_get('google_plusone_button_settings', 0);
  if (isset($button_settings['count'])) {
    $button_settings['annotation'] = $button_settings['count'] ? 'none' : 'bubble';
    $button_settings['width'] = '250';
    unset($button_settings['count']);
    variable_set('google_plusone_button_settings', $button_settings);
  }

  // Same for the block settings
  $block_settings = variable_get('google_plusone_block_settings', 0);
  if (isset($block_settings['count'])) {
    $block_settings['annotation'] = $button_settings['count'] ? 'none' : 'bubble';
    $block_settings['width'] = '250';
    if (empty($block_settings['url'])) {
      $block_settings['url'] = '<front>';
    }
    unset($block_settings['count']);
    variable_set('google_plusone_block_settings', $block_settings);
  }
}