function theme_image_style_list

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 image.admin.inc theme_image_style_list($variables)
cle7 image.admin.inc theme_image_style_list($variables)
elmsmedia7 image.admin.inc theme_image_style_list($variables)
icor7 image.admin.inc theme_image_style_list($variables)
meedjum_blog7 image.admin.inc theme_image_style_list($variables)
mooc7 image.admin.inc theme_image_style_list($variables)

Returns HTML for the page containing the list of image styles.

Parameters

$variables: An associative array containing:

  • styles: An array of all the image styles returned by image_get_styles().

See also

image_get_styles()

Related topics

1 theme call to theme_image_style_list()
image_style_list in modules/image/image.admin.inc
Menu callback; Listing of all current image styles.
3 string references to the theme hook from theme_image_style_list()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

image_menu in modules/image/image.module
Implements hook_menu().
image_theme in modules/image/image.module
Implements hook_theme().
og-7.x-1.x.database.php in sites/all/modules/ulmus/og/tests/og-7.x-1.x.database.php
Filled installation of Drupal 7.0, for test purposes.

File

modules/image/image.admin.inc, line 664
Administration pages for image settings.

Code

function theme_image_style_list($variables) {
  $styles = $variables['styles'];

  $header = array(t('Style name'), t('Settings'), array(
    'data' => t('Operations'),
    'colspan' => 3,
  ));
  $rows = array();
  foreach ($styles as $style) {
    $row = array();
    $row[] = l($style['label'], 'admin/config/media/image-styles/edit/' . $style['name']);
    $link_attributes = array(
      'attributes' => array(
        'class' => array('image-style-link'),
      ),
    );
    if ($style['storage'] == IMAGE_STORAGE_NORMAL) {
      $row[] = t('Custom');
      $row[] = l(t('edit'), 'admin/config/media/image-styles/edit/' . $style['name'], $link_attributes);
      $row[] = l(t('delete'), 'admin/config/media/image-styles/delete/' . $style['name'], $link_attributes);
    }
    elseif ($style['storage'] == IMAGE_STORAGE_OVERRIDE) {
      $row[] = t('Overridden');
      $row[] = l(t('edit'), 'admin/config/media/image-styles/edit/' . $style['name'], $link_attributes);
      $row[] = l(t('revert'), 'admin/config/media/image-styles/revert/' . $style['name'], $link_attributes);
    }
    else {
      $row[] = t('Default');
      $row[] = l(t('edit'), 'admin/config/media/image-styles/edit/' . $style['name'], $link_attributes);
      $row[] = '';
    }
    $rows[] = $row;
  }

  if (empty($rows)) {
    $rows[] = array(array(
      'colspan' => 4,
      'data' => t('There are currently no styles. <a href="!url">Add a new one</a>.', array('!url' => url('admin/config/media/image-styles/add'))),
    ));
  }

  return theme('table', array('header' => $header, 'rows' => $rows));
}