What is the purpose of Id in drupal.info

In Drupal, what is ;$Id$ ?

I know that we use this in an .info file that tells Drupal our module information.

My question is: why do I need ;$Id$ ?

+4
source share
2 answers

$ Id $ is the identification tag of the parallel version system (CVS). If we want to share our module with others, checking it in the repository of modules introduced in Drupals, this value will be automatically replaced by CVS.

+6
source

This is not necessary, but, as Lovelin says, if you want to transfer your module / theme to the Drupal CVS repository and share it with the world, you should put the CVS Id tag on the first line of your php, javascript, css and .info.

It should be written inside the comment (the first line of the file), so depending on the file:

For PHP and Javascript files: // $Id$

For CSS files: /* $Id$ */

In the .info file, comment lines begin with ; therefore you should write ; $id$ ; $id$

Further Information in Coding Standards and Header Comment Blocks

+3
source

All Articles