I had a request this morning from a client who uses the WordPress Download Manager plugin. I can’t say whether it’s any good or not but the admin interface seems ok to me. It does, however, lack somewhat in the settings department.

When you add the following to your theme functions.php it will override the [wpdm_downloadable_nsc] shortcode with our own function where we can put whatever markup we want. This lot might take a bit of untangling. I can only assume the code is intentionally hideous in some attempt at amateur obfuscation.

My changes in this case were to remove the encapsulating divs around the links… my client wanted the download links inline which is why I did this… Uncommenting the lines with // preceeding will return the function to it’s original state and allow you to make your own changes thereafter.

function sb_wpdm_downloadable_nsc($params){
 global $wpdb; 

 $home = home_url('/');

 $sap = count($_GET)>0?'&':'?';

 $data = $wpdb->get_row("select * from ahm_files where id='$id'",ARRAY_A); 
 if($title=='true') $title = "<h3>".$data['title']."</h3>";
 else $title = '';
 if($desc=='true') $desc = $data['description']."</br>";
 else $desc = '';
 $desc = stripslashes($desc);
 if($data['show_counter']!=0) $hc= 'has-counter';
 if($template=='') $template = 'wpdm-only-button';
 $wpdm_login_msg = get_option('wpdm_login_msg')?get_option('wpdm_login_msg'):'Login Required';
 $link_label = $data['link_label']?$data['link_label']:'Download';
 $url = get_option('siteurl')."/wp-login.php?redirect_to=".$_SERVER['REQUEST_URI'];
 $uuid = uniqid();
 //"<div>Login Required<br/><input placeholder='Username' type=text id='username_{$id}' size=15 class='inf' /> <input placeholder='Password' class='inf' type=password id='password_{$id}' size=15 /><span class='perror'></span></div>"; 
 //$html = "<div id='wpdm_file_{$id}' class='wpdm_file $template'>{$title}<div class='cont'>{$desc}{$loginform}<div class='btn_outer'><div class='btn_outer_c'><a class='btn_left $classrel $hc login-please' rel='{$id}' title='{$data[title]}' href='$url' >$link_label</a>"; 
 $html = "<a class='sb_download_label btn_left $classrel $hc login-please' rel='{$id}' title='{$data[title]}' href='$url' >$link_label</a>"; 
 //$html .= "<span class='btn_right counter'>$data[download_count] downloads</span>"; 
// $html .= "<span class='btn_right counter'>Login Required</span>"; 
 //$html .= "</div></div><div class='clear'></div></div></div>";
 else {
 if($data['password']=='') { $url = home_url('/?wpdmact=process&did='.base64_encode($id.'.hotlink')); $classrel = ""; }
 else { $classrel='haspass'; /*$url = home_url('/?download='.$id);*/ $url = home_url('/'); $password_field = "<div>Enter password<br/><input type=password id='pass_{$id}' size=15 /><span class='perror'></span></div>"; }
 $html = "<a class='sb_download_label btn_left $classrel $hc' rel='{$id}' title='{$data[title]}' href='$url' >$link_label</a>";
 //$html .= "<span class='btn_right counter'>$data[download_count] downloads</span>"; 
 //$html .= "<span class='btn_right'>&nbsp;</span>"; 
 //$html .= "</div></div><div class='clear'></div></div></div>";
 return $html; 

A donate button!

Be the first to hear about new products/updates!

This is a mailing list for those people interested in being toldĀ when we releaseĀ a new product (Divi plugin or Theme).

We shall also use this list to let you know about product updates and releases.

You have Successfully Subscribed!