t('ShareThis'), 'module' => 'sharethis_widget', 'widget' => array( 'module' => 'sharethis_widget', 'label' => t('ShareThis widget'), 'name' => t('ShareThis') ) ); } /** * Implementation of hook_share_render(). */ function sharethis_widget_share_render($op, $share, $node = NULL) { switch ($op) { case 'link': $links = array(); if (is_object($node)) { $links['share_'. $share->share_id .'_'. $node->nid] = array( 'title' => $share->render($node), 'html' => TRUE ); } return $links; case 'node': $content = array(); if (is_object($node)) { $content['share_'. $share->share_id .'_'. $node->nid] = array( '#value' => $share->render($node), '#weight' => $share->weight ); } return $content; case 'block': return $share->render($node); } } /******************************************************************************* * Callback Functions, Forms, and Tables ******************************************************************************/ /******************************************************************************* * Module and Helper Functions ******************************************************************************/ /******************************************************************************* * Theme Functions ******************************************************************************/