The 'visibility' attribute of blocks is one of those "magic numbers" with three possible value:

0 => Show on every page except the listed pages.
1 => Show on only the listed pages.
2 => Show if the following PHP code returns TRUE (PHP-mode, experts only).

I'm not sure what would constant names would be good, but anything more meaningful that $block->visibility == 2 is an improvement.

The same thing also applies to the blocks' user visibility settings.

Related issue (only deals with node attributes): #200572: Add constants to magic numbers

Comments

naxoc’s picture

Status: Active » Closed (fixed)

The block modules defines these as constants now.