Tod Abbott

Forum Replies Created

Viewing 1 post (of 1 total)
in reply to: wpdm_tree download options #49343

Tod Abbott
Member

I wanted to share this even though this is an old thread — in case someone else is looking for this solution (like I was).

I did not find a way to do this within the tool, but it is pretty easy to do if you are willing to edit the wpdm-extended-shortcodes plugin. I normally would never recommend updating a plugin like this (because any change will be lost when the plugin is updated), but it was an emergency for me and may be for you…

Open the wpdb-extended-shortcodes.php file

Find the wpdm_embed_tree() function and scroll down toward the bottom of that function (in the version I’m using (2.6.0), this is around line 470).

find this: “a href='” . get_permalink(get_the_ID()) . “‘ rel='” . get_permalink(get_the_ID()) . “‘”

and edit it to look like this: “a href='” . get_permalink(get_the_ID()) . “?wpdmdl=”.get_the_ID().”‘ rel='” . get_permalink(get_the_ID()) . “?wpdmdl=”.get_the_ID().”‘”

Basically, you’re just adding “?wpdmdl=[the post ID]” to each link.

NOTE: this will likely NOT work with login-protected downloads (there should also be a nonce that is not being included) but if you are just offering publicly accessible files, it should be fine.

It also seems like this would be a fairly easy update that could be made an option in the tool (hint… hint…).

Viewing 1 post (of 1 total)