I think we’re misunderstanding each other here, Alex.
The link on the single page outputs this code.
<span class='wpfp-span'><img src='https://192.168.1.141:8888/wp-content/plugins/wp-favorite-posts/img/loading.gif' alt='Loading' title='Loading' class='wpfp-hide wpfp-img' /><a class='wpfp-link' href='?wpfpaction=add&postid=647' title='Add to favorites' rel='nofollow'>Add to favorites</a></span>
ie, it has the class wpfp-link, now I can add another class to the code quite easily, but that doesn’t achieve what I’m trying to do, which is have a different class when it says ‘Add to favourites’ and when it says ‘remove from favourites.
This is the code it outputs when the story being viewed is already in favourites.
<span class='wpfp-span'><img src='https://192.168.1.141:8888/wp-content/plugins/wp-favorite-posts/img/loading.gif' alt='Loading' title='Loading' class='wpfp-hide wpfp-img' /><a class='wpfp-link' href='?wpfpaction=remove&postid=647' title='Remove from favorites' rel='nofollow'>Remove from favorites</a></span>
Same class…
If I add a class to the wp-favourite-posts.php here
function wpfp_link_html($post_id, $opt, $action) {
$link = "<a class='wpfp-link' href='?wpfpaction=".$action."&postid=". $post_id . "' title='". $opt ."' rel='nofollow'>". $opt ."</a>";
$link = apply_filters( 'wpfp_link_html', $link );
return $link;
}
It adds it for both remove and add.