You are here

function sharemessage_init in Share Message 7

Implements hook_init().

File

./sharemessage.module, line 608
New Sharing Module.

Code

function sharemessage_init() {
  if (!empty($_GET['smid']) && variable_get('sharemessage_message_enforcement', TRUE)) {
    $sharemessage = entity_load_single('sharemessage', $_GET['smid']);
    if (!empty($sharemessage)) {
      entity_view('sharemessage', array(
        $sharemessage
          ->identifier() => $sharemessage,
      ), 'only_og_tags');
    }
  }
}