You are here

function _tweet_exclude in Tweet 5.2

Same name and namespace in other branches
  1. 6.4 tweet.module \_tweet_exclude()
  2. 6 tweet.module \_tweet_exclude()
  3. 6.2 tweet.module \_tweet_exclude()
  4. 6.3 tweet.module \_tweet_exclude()
  5. 7.4 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_link in ./tweet.module
Implementation of hook_link().

File

./tweet.module, line 316
Builds links to post pages to twitter.

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;
}