Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Change Links to Buttons
- * @since 1.0
- * @version 1.0
- */
- function mycred_pro_turn_link_into_button( $html, $atts ) {
- // Swap opening tag
- $html = str_replace( '<a', '<button', $html );
- // Swap closing tag
- $html = str_replace( '</a>', '</button>', $html );
- // Remove href="..."
- $href = 'href="' . $atts['href'] . '"';
- $html = str_replace( $href, '', $html );
- return $html;
- }
- add_filter( 'mycred_link', 'mycred_pro_turn_link_into_button' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement