Skip to content

Commit

Permalink
Support markdown extra classes on lightbox
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jan 9, 2015
1 parent c7647ef commit b3f085c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion system/src/Grav/Common/Markdown/MarkdownGravLinkTrait.php
Expand Up @@ -94,7 +94,6 @@ protected function identifyLink($Excerpt)
if (!isset($actions['lightbox']) && !is_array($src)) {
$Excerpt['element']['attributes']['src'] = $src;
} else {

// Create the custom lightbox element
$Element = array(
'name' => 'a',
Expand All @@ -106,6 +105,11 @@ protected function identifyLink($Excerpt)
),
);

// Set any custom classes on the lightbox element
if (isset($Excerpt['element']['attributes']['class'])) {
$Element['attributes']['class'] = $Excerpt['element']['attributes']['class'];
}

// Set the lightbox element on the Excerpt
$Excerpt['element'] = $Element;
}
Expand Down

0 comments on commit b3f085c

Please sign in to comment.