Problem/Motivation

The 'mark' theme hook is static allowing only 'new' or 'updated' values/classes. This makes altering these values and classes impossible unless the theme function (soon to be template) is overridden. New core use case: #1067412: search_excerpt is not themeable and should use <mark> to highlight search results.

Proposed resolution

Abstract the attributes of the open tag and value in between it and the closing tag to variables that are passed in the render array. We can keep the constants, but the attributes and value can be populated in preprocess based on this "status".

Remaining tasks

User interface changes

API changes

Comments

mgifford’s picture

joelpittet’s picture

Status: Active » Closed (duplicate)

now both #1311372: Use <mark> element for 'mark' theme hook and #867830: "unpublished" status of rendered entities is not accessible (and looks bad). Are actively doing this in slightly different way. Going to mark this as a duplicate so we don't get a third. Likely need to consolidate those two as well...