Currently, this theme function only takes $url and $title parameters, respectively used as $url and part of the $options array for the l() call used inside.

However, the $options parameters to l() is hardcoded to ignore any extra options, which could be passed in: array('attributes' => array('title' => $variables['title']))).

This prevents using it with any URL containing options like a query or fragment. It should merge in options received, which would also have the advantage of making it directly usable with the url/options format returned by entity_uri(). Having $title, which is only part of these options, be a direct parameter to theme_more_link(), makes is not completely obvious, but the options merging could still be done.

Comments

fgm’s picture

Status: Active » Needs review
StatusFileSize
new1.49 KB

Suggested patch.

fgm’s picture

#1: theme_1036190.patch queued for re-testing.

pbull’s picture

StatusFileSize
new1.18 KB

Re-rolled this patch in Git; removed the debugging lines from bootstrap.inc.

fgm’s picture

Status: Needs review » Needs work

Thanks for rerolling, but you did not include the "options" part of the phpdoc, which I think is needed.

pbull’s picture

Status: Needs work » Needs review
StatusFileSize
new1.4 KB

Good point, updated patch attached with phpdocs added.

droplet’s picture

We started anther issue included accessibility: #1136680: #type 'more_link' - previously theme_more_link() - should have more context

if it doesn't backport, do you mind I close this one as #1136680 has more discuss. thanks.

fgm’s picture

Status: Needs review » Closed (won't fix)