commit bd19c0c019d401b4b9c0f6bc42f6eaf6038b4ddc Author: Joel Pittet Date: Fri Apr 5 20:45:47 2013 -0700 rdf diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index 547075a..0f402d4 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -675,29 +675,22 @@ function rdf_preprocess_username(&$variables) { $variables['attributes']['about'] = url('user/' . $variables['uid']); } - $attributes = array(); // The typeof attribute specifies the RDF type(s) of this resource. They // are defined in the 'rdftype' property of the user RDF mapping. if (!empty($rdf_mapping['rdftype'])) { - $attributes['typeof'] = $rdf_mapping['rdftype']; + $variables['attributes']['typeof'] = $rdf_mapping['rdftype']; } // Annotate the username in RDFa. A property attribute is used with an empty // datatype attribute to ensure the username is parsed as a plain literal // in RDFa 1.0 and 1.1. if (!empty($rdf_mapping['name'])) { - $attributes['property'] = $rdf_mapping['name']['predicates']; - $attributes['datatype'] = ''; + $variables['attributes']['property'] = $rdf_mapping['name']['predicates']; + $variables['attributes']['datatype'] = ''; } // Add the homepage RDFa markup if present. if (!empty($variables['homepage']) && !empty($rdf_mapping['homepage'])) { - $attributes['rel'] = $rdf_mapping['homepage']['predicates']; - } - // The remaining attributes can have multiple values listed, with whitespace - // separating the values in the RDFa attributes - // (see http://www.w3.org/TR/rdfa-syntax/#rdfa-attributes). - // Therefore, merge rather than override so as not to clobber values set by - // earlier preprocess functions. - $variables['attributes'] = NestedArray::mergeDeep($variables['attributes'], $attributes); + $variables['attributes']['rel'] = $rdf_mapping['homepage']['predicates']; + } } /** diff --git a/core/modules/user/user.module b/core/modules/user/user.module index a5dbdd8..253e7ce 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -744,6 +744,8 @@ function user_template_preprocess_default_variables_alter(&$variables) { * Modules that make any changes to variables like 'name' or 'extra' must ensure * that the final string is safe to include directly in the output by using * check_plain() or filter_xss(). + * + * @see template_process_username() */ function template_preprocess_username(&$variables) { $account = $variables['account'];