Skip to content

Instantly share code, notes, and snippets.

@delineas
Created December 21, 2015 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delineas/42ae5b7afcc3278f333f to your computer and use it in GitHub Desktop.
Save delineas/42ae5b7afcc3278f333f to your computer and use it in GitHub Desktop.
Drupal 7 Panels Visibility Rule: Body Content Counts More 1000 Chars
<?php
// Insert in input box without <?php tags
if(isset($contexts['argument_entity_id:node_1']->data->body['und'][0]['value'])){
if(strlen(strip_tags($contexts['argument_entity_id:node_1']->data->body['und'][0]['value'])) > 1000 ) {
return TRUE;
}
else {
return FALSE;
}
}
else {
return FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment