Header comment blocks

All Drupal source code files should start with a header containing the RCS $Id$ keyword:

<?php
// $Id: CODING_STANDARDS,v 1.1 2001/11/05 07:32:17 natrak Exp $

If you add a new file to CVS, just write
<?php
// $Id$

Copy this line 1:1. Please note that

  • The CVS Id tag should always be on the first line of all files (for PHP files, it's actually the second line).
  • Everything after the starting $Id and before the closing $ is automatically generated by CVS - you shouldn't edit this manually.
  • CVS Id tags are case-sensitive.
  • You must not add a space between $Id and $.

Other files

CSS files
should contain the CVS Id tag on the first line using a valid CSS comment:
/* $Id$ */

Be careful, because using a invalid or no comment syntax might break the whole stylesheet in some browsers.
JavaScript files
should contain the CVS Id tag on the first line using a JS inline comment:
// $Id$

Text files
like README.txt and CHANGELOG.txt should contain the CVS Id tag on the first line using one of the following styles:
/* $Id$ */
# $Id$

 
 

Drupal is a registered trademark of Dries Buytaert.