You are here

function media_admin_paths in D7 Media 7

Same name and namespace in other branches
  1. 7.4 media.module \media_admin_paths()
  2. 7.2 media.module \media_admin_paths()
  3. 7.3 media.module \media_admin_paths()

Implements hook_admin_paths().

File

./media.module, line 271
Media API

Code

function media_admin_paths() {
  $paths = array(
    'media/*/edit' => TRUE,
    'media/*/multiedit' => TRUE,
    'media/*/delete' => TRUE,
  );

  // If the media browser theme is set to the admin theme, ensure it gets set
  // as an admin path as well.
  $dialog_theme = media_variable_get('dialog_theme');
  if (empty($dialog_theme) || $dialog_theme == variable_get('admin_theme')) {
    $paths['media/browser'] = TRUE;
    $paths['media/browser/*'] = TRUE;
  }
  return $paths;
}