You are here

function icon_wrapper_options in Icon API 7

Provides the list of permitted wrapper options.

Return value

array An associative array of key/value pairs, where the wrapper HTML element is the key and an human readable label is the value.

3 calls to icon_wrapper_options()
form_process_icon_selector in includes/element.inc
Processes an icon select list form element.
form_type_icon_selector_value in includes/element.inc
Implements form_type_ELEMENT_value().
theme_icon in includes/theme.inc
Theming responsibility is always passed to the bundle provider.

File

./icon.module, line 686
icon.module Provides icon integration with menu items.

Code

function icon_wrapper_options() {

  // Use the advanced drupal_static() pattern, since this is called very often.
  static $drupal_static_fast;
  if (!isset($drupal_static_fast)) {
    $drupal_static_fast['options'] =& drupal_static(__FUNCTION__);
  }
  $options =& $drupal_static_fast['options'];
  if (!isset($options)) {
    $options = array(
      '' => t('None'),
      'div' => 'Div',
      'span' => 'Span',
      'h2' => 'H2',
      'h3' => 'H3',
      'h4' => 'H4',
      'h5' => 'H5',
      'h6' => 'H6',
      'p' => 'P',
      'em' => 'Em',
      'strong' => 'Strong',
    );
    drupal_alter(__FUNCTION__, $options);
  }
  return $options;
}