Define constants for service_links_X settings
webchick - September 23, 2008 - 19:50
| Project: | Service links |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | LouisEric |
| Status: | active |
Jump to:
Description
Reading the code in theme_service_links_build_link is challenging because there's stuff in there like:
<?php
switch (variable_get('service_links_style', 1)) {
case 1:
...
case 2:
...
case 3:
...
}
?>It'd be easier to grok if it was:
<?php
switch (variable_get('service_links_style', SERVICE_LINKS_STYLE_TEXT)) {
case SERVICE_LINKS_STYLE_TEXT:
...
case SERVICE_LINKS_STYLE_IMAGE:
...
case SERVICE_LINKS_STYLE_IMAGE_AND_TEXT:
...
}
?>
#1