You are here

function _tweet_exclude in Tweet 7.4

Same name and namespace in other branches
  1. 5.2 tweet.module \_tweet_exclude()
  2. 6.4 tweet.module \_tweet_exclude()
  3. 6 tweet.module \_tweet_exclude()
  4. 6.2 tweet.module \_tweet_exclude()
  5. 6.3 tweet.module \_tweet_exclude()

Excludes certain Node IDs from displaying links.

Parameters

$nid: The NID to check for exclusion.

Return value

TRUE if the node should be excluded, or FALSE if it should not.

1 call to _tweet_exclude()
tweet_node_view in ./tweet.module
Implements hook_node_view().

File

./tweet.module, line 348
Builds links to post pages to Twitter API sites.

Code

function _tweet_exclude($nid) {
  $exclude = explode(',', variable_get('tweet_exclude', ''));
  $excludes = array();
  foreach ($exclude as $check) {
    $excludes[] = trim($check);
  }
  if (!empty($excludes)) {
    if (in_array($nid, $excludes)) {
      return TRUE;
    }
  }
  return FALSE;
}