Created
December 21, 2015 13:34
-
-
Save delineas/42ae5b7afcc3278f333f to your computer and use it in GitHub Desktop.
Drupal 7 Panels Visibility Rule: Body Content Counts More 1000 Chars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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