You are here

function template_preprocess_smiley_span_smiley in Smiley 7.2

Prepares variables for span smiley templates.

Default template: smiley_span_smiley.tpl.php.

Parameters

array $variables: An associative array containing:

  • image_path: The path to the smiley image.
  • classes_array: An array of classes to add to the smiley.
  • replaced_text: The text that was replaced with this smiley.

File

./smiley.module, line 116
A framework for replacing text smileys with images.

Code

function template_preprocess_smiley_span_smiley(&$variables) {

  // Add some default classes.
  $variables['classes_array'][] = 'smiley';
  $variables['classes_array'][] = 'image_smiley';

  // Include the default styles.
  drupal_add_css(drupal_get_path('module', 'smiley') . '/smiley_span_smiley.css');
}