Hello,
so I wanted to change the code of a button that my theme generates automatically. Basically you just enter an URL in your post, and the plugin (called "WPReviewPlugin") on my site inserts it in the image of some kind of button.
I need to change this link to a cloaked, internal link, and for my webanalytics service Clicky to track these kinds of links, there has to be something added to it. This:
<a href="http://somecoolsite.com">Click here</a>
needs to be changed like this:
<a class="clicky_log_outbound" href="http://somecoolsite.com">Click here</a>
As the support of the plugin/theme is virtually nonexistent, I tried to do it myself, and found the file "wprevisitsite.php", which looks like this:
This part:
seemed to be the relevant part, so I changed it into this:
which leads into this:
so I wanted to change the code of a button that my theme generates automatically. Basically you just enter an URL in your post, and the plugin (called "WPReviewPlugin") on my site inserts it in the image of some kind of button.
I need to change this link to a cloaked, internal link, and for my webanalytics service Clicky to track these kinds of links, there has to be something added to it. This:
<a href="http://somecoolsite.com">Click here</a>
needs to be changed like this:
<a class="clicky_log_outbound" href="http://somecoolsite.com">Click here</a>
As the support of the plugin/theme is virtually nonexistent, I tried to do it myself, and found the file "wprevisitsite.php", which looks like this:
PHP:
<?php
$visitsite = get_option("newembed-visitsite"); // no, individual, all
$visitsitewhere = get_option("newembed-visitsitewhere"); // below, above, wprevisitsitebutton
$visitsitebutton = get_option("newembed-visitsitebutton");
$visitsitenewwindow = get_option('newembed-visitsitenewwindow');
if ($visitsitenewwindow == "Yes") {
$target = "_blank";
} else {
$target = "";
}
$visitsiteurl = get_post_meta($post->ID, "_affurl", true);
if ((string) $visitsiteurl != "") { // no visitsiteurl
$buttoncode = "<a href='".$visitsiteurl."' ".wpre_arewenofollow()." target='".$target."' class='btn-click-here'><img src='".get_bloginfo('url')."/wp-content/plugins/re/images/visitsite/".$visitsitebutton."' style='border: 0px;'></a>";
echo $buttoncode;
PHP:
$buttoncode = "<a href='".$visitsiteurl."'
PHP:
$buttoncode = "<a class="clicky_log_outbound" href='".$visitsiteurl."'
OK, so I have no idea of php whatsoever, meaning I'm completely stuck. Has anyone an idea how to resolve this?Parse error: syntax error, unexpected T_STRING in /home/blablabla/wp-content/themes/newreviewclean/wprevisitsite.php on line 20