{"id":6033108,"date":"2015-04-20T07:23:39","date_gmt":"2015-04-20T07:23:39","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/filter-for-buttons\/"},"modified":"2016-08-24T14:57:08","modified_gmt":"2016-08-24T14:57:08","slug":"filter-for-buttons","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/filter-for-buttons\/","title":{"rendered":"Filter for buttons"},"content":{"rendered":"<p>It would be nice if you could add a filter for the button links, so we can add attributes, custom classes, ID etc&#8230;, useful for implementing click tracking or adding date attributes for passing data to javascript.<\/p>\n<p>I didn&#8217;t test it but something like the following should work.<\/p>\n<p><code>$values[] = apply_filter(&#039;genesis_author_pro_button_link&#039;, sprintf( &#039;&lt;a href=&quot;%s&quot; class=&quot;button button-book&quot; target=&quot;_blank&quot;&gt;%s&lt;\/a&gt;&#039;, $uri, $text ), $post_id, $uri, $text);<\/code><\/p>\n","protected":false},"template":"","class_list":["post-6033108","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6033108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6033108\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6033108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}