Scan for custom .inc (PHP) files
Please remember that the following assumes you're using the Bella theme, and that the theme itself lives at sites/all/themes/bella inside your Drupal installation.
- Scan for custom .inc(PHP) files
- If there are certain PHP functions you'd like to be available to you, but maybe you don't want to or don't know how to write a custom module, you can optionally create a file called bella.custom.incinside the theme directory. By doing so, any functions defined inside that file will automatically be included just before the theme is rendered. It's much like adding custom functions to thetemplate.phpfile, except when the theme requires an update, the custom functions you might have otherwise hard-coded into thetemplate.phpwill not be lost.
- For example, you may wish to customize the way the submitted by information appears on each node. After enabling this setting and creating the bella.custom.incfile so that it now lives atsites/all/themes/bella/bella.custom.inc, you could then place the following code inside your newbella.custom.incfile:<?php function bella_preprocess_node(&$vars) { $vars['submitted'] = $vars['date'] . ' • ' . $vars['name']; }
- This would result in the submitted by area being displayed similar to this:
- 
Tue Jan 1, 2013 • UserName 
NOTE: remember to clear the cache after making any changes such as this so that the system will recognize your changes.
