Hi there, great plugin i love it!
I am trying to hack the plugin so i can define a rel attribute for a link and... i need a bit of help :D
I am not a master in PHP, but im not a beginner eather, but i would appreciate some guidance here before ill break the plugin.
So in plugins index.php i have found the output that the plugin is generating, and then i have discovered that this wont be so easy. here is what the output looks like
[Code moderated as per the Forum Rules. Please use the pastebin]
Now you can see that the link is being outputed with a 'fetch_link_settings' function. That looks like this:
function fetch_link_settings(){
global $post;
// If the destination url is set by the user, use that. Otherwise, use the permalink
$destination_url = get_post_meta($post->ID, '_promo_slider_url', TRUE);
if( !$destination_url ) $destination_url = get_permalink($post->ID);
// If the target attribute is set the user, use that. Otherwise, set it to _self
$target = get_post_meta($post->ID, '_promo_slider_target', TRUE);
if( !$target ) $target = '_self';
// Setup the disable links variable
$disable_links = get_post_meta($post->ID, '_promo_slider_disable_links', TRUE);
return compact('destination_url', 'target', 'disable_links');
}
now im a bit confused as to how to add a PHP code that in human language would sound something like this:
If custom field x value is true then output custom field value to links rel, else do nothing.
any help here?