Description


If you want to change Package download link to image, or if you want to change default download label to something else you can use this hook.

Parameters


Two arguments are passed to this hook.

Usage


To change download link text to an image or other text.
add_filter('wpdm_button_image','my_btn_image',10,2);

Examples


<?php
add_filter('wpdm_button_image','my_btn_image',10,2);
function my_btn_image($link_label,$package){
    $link_label = "<img src='img/source' >";
    return $link_label;
}
?>

Related


Last Updated: Jun 29, 2014


Discussion

  • welswebmaster

    Where is this code to be added? Functions.php or elsewhere?

  • welswebmaster

    Instead, I ended up using my theme style override and chose to change this CSS to make it work for me by replacing the gradient and border color to match my download button. I like it. Hope it helps someone else looking for an easy solution.

    .w3eden .btn-primary {
    background-image: linear-gradient(to bottom, #428bca 0px, #2d6ca2 100%);
    background-repeat: repeat-x;
    border-color: #2b669a;

    Please close ticket.

Leave a Reply