function _drupalnode in Coder 7.2
Creates a link to the Drupal node.
Parameters
int $nid: The Drupal Node ID to link to.
string $anchor: (optional) An anchor tag. Defaults to an empty string.
Return value
string An HTML link to the drupal.org node. Except when called from Drush, then it is a plain text link.
28 calls to _drupalnode()
- coder_review_47_reviews in coder_review/
includes/ coder_review_47.inc - Implements hook_reviews().
- coder_review_5x_reviews in coder_review/
includes/ coder_review_5x.inc - Implements hook_reviews().
- coder_review_6x_reviews in coder_review/
includes/ coder_review_6x.inc - Implements hook_reviews().
- coder_review_7x_reviews in coder_review/
includes/ coder_review_7x.inc - Implements hook_reviews().
- coder_review_comment_reviews in coder_review/
includes/ coder_review_comment.inc - Implements hook_reviews().
File
- coder_review/
coder_review.common.inc, line 1500 - Common functions used by both the drush and form interfaces.
Code
function _drupalnode($nid, $anchor = '') {
$link = "http://drupal.org/node/{$nid}";
if ($anchor) {
$link .= "#{$anchor}";
}
return $link;
}