You are here

function media_admin_paths in D7 Media 7.2

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

Implements hook_admin_paths().

File

./media.module, line 168
Media API

Code

function media_admin_paths() {
  $paths['media/*/edit/*'] = TRUE;
  $paths['media/*/format-form'] = TRUE;
  if (module_exists('admin_language')) {
    $paths['media/ajax/*'] = TRUE;

    // For admin_language module compatibility.
  }

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