You are here

function theme_freelink_pluginname in Freelinking 7.3

Same name and namespace in other branches
  1. 6.3 freelinking.api.php \theme_freelink_pluginname()

Individual modules may implement a theme_freelink_pluginname(). Doing so will override the standard theme_freelink(). Modules must still implement hook_theme to declare their theme function.

In this example, the "pluginname" plugin is themed to become an image to the targeted URL, instead of a link.

File

./freelinking.api.php, line 76
API documentation for Freelinking.

Code

function theme_freelink_pluginname($variables) {
  $link = $variables['link'];

  // TODO: Should this theme freelink_pluginname be declared in hook_theme()?
  return theme('image', array(
    'path' => $link[1],
    'width' => $link[0],
    'height' => $link[2]['attributes']['title'],
  ));
}