-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_feature.module
More file actions
69 lines (64 loc) · 1.92 KB
/
admin_feature.module
File metadata and controls
69 lines (64 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* @file
* Code for the admin_feature feature.
*/
include_once 'admin_feature.features.inc';
/**
* Implements hook_date_formats(). Inserted by Alec, not by Features.
*/
function admin_feature_date_formats() {
return array(
// Creates a new format for a new, custom format type.
array(
'type' => 'short_month',
'format' => 'M',
'locales' => array(),
),
// Defines a format and makes it available to core's short format type.
array(
'type' => 'normal',
'format' => 'M d, Y',
'locales' => array(),
),
array(
'type' => 'day_number',
'format' => 'd',
'locales' => array(),
),
array(
'type' => 'numbers',
'format' => 'm/d/Y',
'locales' => array(),
),
);
}
/**
* Implements hook_date_format_types(). Inserted by Alec, not by Features.
*/
function admin_feature_date_format_types() {
return array(
'short_month' => t('Month Abbreviated'),
'normal' => t('Normal'),
'day_number' => t('Day Number'),
'numbers' => t('Numerical'),
);
}
/**
* Customize Media Stuff
*/
function admin_feature_preprocess_media_dialog_page(&$vars) {
if (isset($vars['page']['content']['system_main']['tabset']['tabs']['#primary'])
&& is_array($vars['page']['content']['system_main']['tabset']['tabs']['#primary'])) {
foreach ($vars['page']['content']['system_main']['tabset']['tabs']['#primary']
as $key => $element) {
$markup = $element['element']['#markup'];
$markup = str_replace('Library (MBP)','Media Library',$markup);
$markup = str_replace('My files (MBP)','My Media',$markup);
$vars['page']['content']['system_main']['tabset']['tabs']['#primary'][$key]['element']['#markup'] = $markup;
// dpm($element);
// $vars['page']['content']['system_main']['tabset']['tabs']['#primary'][$key]['element']['#markup'] = 'stuff';
}
}
// $vars['page']['content']['system_main']['tabset']['tabs']['#primary'] = array();
}