Recursive placeholders function for Drupal 7