summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevinCarlson2012-10-06 23:39:48 (GMT)
committer Paris Liakos2012-10-06 23:39:48 (GMT)
commit49343d2ea84f693120847386c4c11ba17d80dfce (patch)
treef9e5379467570173fdd28caaebf403197b360da7
parent0c52a6b114af98b784618e3784e29fff71c79bd9 (diff)
Issue #1791492 Remove unused theme implementations
-rw-r--r--includes/media.theme.inc45
-rw-r--r--media.module23
2 files changed, 2 insertions, 66 deletions
diff --git a/includes/media.theme.inc b/includes/media.theme.inc
index 4180faa..d801baa 100644
--- a/includes/media.theme.inc
+++ b/includes/media.theme.inc
@@ -121,17 +121,6 @@ function theme_media_admin_thumbnail($variables) {
return $output;
}
-
-/**
- * Theme operations for a thumbnail.
- */
-function theme_media_admin_thumbnail_operations($variables) {
- $destination = drupal_get_destination();
- $file = $variables['file'];
- $output = l(t('edit'), 'file/' . $file->fid . '/edit', array('query' => $destination));
- return $output;
-}
-
/**
* Add messages to the page.
*/
@@ -182,40 +171,6 @@ function theme_media_browser_control_result_limit($variables) {
return theme('item_list', array('items' => $per_display, 'attributes' => array('class' => 'result_limit')));
}
-
-/**
- * Stolen from file.module theme_file_link
- *
- * @param $variables
- * An associative array containing:
- * - file: A file object to which the link will be created.
- */
-function theme_media_link($variables) {
- $file = $variables['file'];
-
- $url = 'file/' . $file->fid;
- $icon = theme('file_icon', array('file' => $file));
-
- // Set options as per anchor format described at
- // http://microformats.org/wiki/file-format-examples
- $options = array(
- 'attributes' => array(
- 'type' => $file->filemime . '; length=' . $file->filesize,
- ),
- );
-
- // Use the description as the link text if available.
- if (empty($file->description)) {
- $link_text = check_plain($file->filename);
- }
- else {
- $link_text = check_plain($file->description);
- $options['attributes']['title'] = check_plain($file->filename);
- }
-
- return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>';
-}
-
/**
* Adds a wrapper around a preview of a media file.
* @param unknown_type $element
diff --git a/media.module b/media.module
index 03b06a9..cd8c351 100644
--- a/media.module
+++ b/media.module
@@ -264,23 +264,14 @@ function media_permission() {
/**
* Implements hook_theme().
- *
- * @TODO: Needs a major cleanup.
*/
function media_theme() {
return array(
-
// The default media file list form element.
'media_file_list' => array(
'variables' => array('element' => NULL),
),
- // A link for a file w/ an icon to the media/$fid page.
- 'media_link' => array(
- 'variables' => array('file' => NULL),
- 'file' => 'includes/media.theme.inc',
- ),
-
// A preview of the uploaded file.
'media_thumbnail' => array(
'render element' => 'element',
@@ -293,17 +284,6 @@ function media_theme() {
'file' => 'includes/media.theme.inc',
),
- // Administrative thumbnail previews.
- 'media_admin_thumbnail_operations' => array(
- 'variables' => array('file' => NULL),
- 'file' => 'includes/media.theme.inc',
- ),
-
- // Tabs in the media browser.
- 'media_browser_tabs' => array(
- 'file' => 'includes/media.theme.inc',
- ),
-
// Dialog page.
'media_dialog_page' => array(
'render element' => 'page',
@@ -311,12 +291,13 @@ function media_theme() {
'file' => 'includes/media.theme.inc',
),
- //
+ // Media form API element type.
'media_element' => array(
'render element' => 'element',
'file' => 'includes/media.theme.inc',
),
+ // Display a file as a large icon.
'media_formatter_large_icon' => array(
'variables' => array('file' => NULL, 'attributes' => array()),
'file' => 'includes/media.theme.inc',