Skip to content

Commit

Permalink
make data attributes filterable, fixes #73
Browse files Browse the repository at this point in the history
  • Loading branch information
billerickson committed Feb 12, 2019
1 parent d59ebef commit af5d254
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/class-shared-counts-front.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ public function link( $types = 'facebook', $id = false, $echo = true, $style = '
}

// Add data attribues.
if ( ! empty( apply_filters( 'shared_counts_link_data', $attr, $link, $id ) ) ) {
$attr = apply_filters( 'shared_counts_link_data', $attr, $link, $id );
if ( ! empty( $attr ) ) {
foreach ( $attr as $key => $val ) {
$data .= ' data-' . sanitize_html_class( $key ) . '="' . esc_attr( $val ) . '"';
}
Expand Down

0 comments on commit af5d254

Please sign in to comment.