Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Please post your own snippets up here for others and follow these simple guidelines.
- Click on ADD CHILD PAGE from the section that your snippet belongs with (e.g. PHP block snippets, PHP page snippets, etc.)
- Give your snippet a short and obvious title so it is easy for others to see what your snippet does.
- Please include a simple introduction at the top of your PHP Snippet which explains:
- What the snippet does
- Which versions of Drupal has it been tested with
- Any extra information for newbies that you think is relevant