Skip to content
This repository was archived by the owner on May 2, 2018. It is now read-only.

Commit 9a2444e

Browse files
committed
Merge pull request #1 from rasmustaarnby/filters-hooks
Added filter to tool tip html, so it can be overridden externally
2 parents 9073728 + f7415e0 commit 9a2444e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

public/class-glossary.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ public function tooltip_html( $link, $title, $post, $target, $nofollow, $interna
426426
if ( $internal ) {
427427
$readmore = '... <a href="' . get_the_permalink() . '">' . __( 'More' ) . '</a>';
428428
}
429-
$link_tooltip .= "\n" . '<span class="glossary-tooltip-text">' . $this->get_the_excerpt( $post ) . $readmore . '</span>'
429+
$excerpt = $this->get_the_excerpt( $post );
430+
$link_tooltip .= "\n" . '<span class="glossary-tooltip-text">' . $excerpt . $readmore . '</span>'
430431
. "\n" . '</span>'
431432
. "\n" . '</span>';
432-
return $link_tooltip;
433+
return apply_filters( 'glossary_tooltip_html', $link_tooltip, $title, $excerpt, $photo, $post, $target, $nofollow, $internal );
433434
}
434435

435436
/**

0 commit comments

Comments
 (0)