Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/plugins/content_types/user_context/profile_fields.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
/** |
|
4 |
* @file |
|
5 |
*/ |
|
6 |
|
|
3 | 7 |
if (module_exists('profile') && !(defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') && !is_null(profile_user_categories())) { |
4 | 8 |
/** |
5 | 9 |
* Plugins are described by creating a $plugin array which will be used |
... | ... | |
26 | 30 |
$block->module = 'profile fields'; |
27 | 31 |
|
28 | 32 |
if ($account) { |
29 |
// Get the category from the options |
|
33 |
// Get the category from the options.
|
|
30 | 34 |
$category = str_replace("_", " ", $conf['category']); |
31 | 35 |
|
32 |
// Set the subject to the name of the category |
|
36 |
// Set the subject to the name of the category.
|
|
33 | 37 |
$block->subject = $category; |
34 | 38 |
|
35 |
// Put all the fields in the category into an array |
|
39 |
// Put all the fields in the category into an array.
|
|
36 | 40 |
profile_view_profile($account); |
37 | 41 |
|
38 | 42 |
if (is_array($account->content[$category])) { |
... | ... | |
46 | 50 |
} |
47 | 51 |
|
48 | 52 |
if (count($vars) == 0) { |
49 |
// Output the given empty text |
|
53 |
// Output the given empty text.
|
|
50 | 54 |
$output = $conf['empty']; |
51 | 55 |
} |
52 | 56 |
else { |
53 |
// Call the theme function with the field vars |
|
57 |
// Call the theme function with the field vars.
|
|
54 | 58 |
$output = theme('profile_fields_pane', $category, $vars); |
55 | 59 |
} |
56 | 60 |
|
... | ... | |
65 | 69 |
|
66 | 70 |
return $block; |
67 | 71 |
} |
72 |
|
|
68 | 73 |
/** |
69 | 74 |
* Helper function : build the list of categories for the 'edit' form. |
70 | 75 |
*/ |
Formats disponibles : Unified diff
Weekly update of contrib modules