Additional attribute for button-Shortcode
-
Hi,
i need to add additional code for Google Analytics to the a-Tag. Example<a href="http://link-to-somewhere" onclick="_gaq.push(['_link', this.href]); return false;">touch me</a>So i tried to append some code in the file shortcodes.php. But after that, only a white webpage appears. Here is my extended part of the button code, the Attribute ist named mydat:
function button_shortcode( $atts, $content = null ) { $defaults = apply_filters( 'arconix_button_shortcode_args', array( 'size' => 'medium', 'color' => 'white', 'url' => '#', 'target' => '', 'rel' => '' 'mydat' => '' ) ); // Properly escape our data $mydat = esc_attr( $mydat ); return "<a href='{$url}' '{$mydat}' class='arconix-button arconix-button-{$size} arconix-button-{$color}'{$rel}{$target}>{$content}</a>"; }What can i do?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Additional attribute for button-Shortcode’ is closed to new replies.