Commit b29ad669 authored by alexpott's avatar alexpott

Issue #2329787 by cilefen, tuutti | davidhernandez: Move RDF classes from preprocess to templates.

parent d7840d65
......@@ -567,14 +567,16 @@ function rdf_preprocess_image(&$variables) {
*/
function template_preprocess_rdf_metadata(&$variables) {
foreach ($variables['metadata'] as $key => $attributes) {
// Add a class so that developers viewing the HTML source can see why there
// are empty <span> tags in the document.
$attributes['class'][] = 'rdf-meta';
$attributes['class'][] = 'hidden';
// The XHTML+RDFa doctype allows either <span></span> or <span /> syntax to
// be used, but for maximum browser compatibility, W3C recommends the
// former when serving pages using the text/html media type, see
// http://www.w3.org/TR/xhtml1/#C_3.
$variables['metadata'][$key] = new Attribute($attributes);
if (!is_null($attributes)) {
$variables['metadata'][$key] = new Attribute($attributes);
}
else {
$variables['metadata'][$key] = new Attribute();
}
}
}
......@@ -13,5 +13,5 @@
*/
#}
{% for attributes in metadata %}
<span{{ attributes }}></span>
<span{{ attributes.addClass('rdf-meta', 'hidden') }}></span>
{% endfor %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment