The google_plusone_link function does not check the google_plusone_node_types variable, nor does it check user_access('view google plusone'). Suggest...

function google_plusone_link($type, $node = NULL, $teaser = FALSE) {
  $links = array();
  $view_mode = $teaser ? 'teaser' : 'full';
  $locations = variable_get('google_plusone_node_location', array('full'));
  if (in_array('link', $locations, TRUE)
    && $type === 'node'
    && in_array($node->type, variable_get('google_plusone_node_types', array()), TRUE)
    && user_access('view google plusone')) {
    $default = array(
      'count' => '', // true
      'size' => '',  // standard
      'css' => 'margin: 0 1em 1em 1em;float:right;',
      'syntax' => 'g:plusone',
    );
    $button_settings = variable_get('google_plusone_button_settings', $default) + array('node' => $node);
    $links['google_plusone'] = array(
      'title' => theme('google_plusone_button', $button_settings),
      'html' => TRUE,
    );
  } // end if
  return $links;
}

Comments

corbacho’s picture

Totally right, and your suggestion is the right fix.. committed and ready to download (rc5 version)
Thanks Joe!

corbacho’s picture

Status: Active » Fixed

marking as fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.