You are here

function _service_links_get_node_path in Service links 7.2

Same name and namespace in other branches
  1. 6.2 service_links.module \_service_links_get_node_path()

Detect if the node is used as front page and provide the path to use.

1 call to _service_links_get_node_path()
_service_links_get_tags in ./service_links.module
Fill an array with tags and the content to substitute.

File

./service_links.module, line 842
Adds social network links to the content.

Code

function _service_links_get_node_path($node) {
  static $front_page;
  if (!isset($front_page)) {
    $front_page = variable_get('site_frontpage', 'node');
  }
  $path = "node/{$node->nid}";
  if ($path == $front_page || isset($node->uri) && (object) $node->uri['path'] == $front_page) {
    $path = '<front>';
  }
  return $path;
}