Add download funtionality to Royal PrettyPhoto plugin

A way to extend Royal prettyPhoto plugin to support download image functionality is via Javascript.

Just put the following lines into the functions.php of your theme file.

 * Adds download functionality to prettyPhoto plugin
 * @author lenasterg
function ls_prettyPhoto_Download() {
 echo '<style>.pp_download{ background: #ccc; border-radius: 3px; height: 25px; padding: 4px;}</style>

jQuery(document).ready(function() {
 changepicturecallback: function(){
 $getit= settings.image_markup.replace(/{path}/g,pp_images[set_position]);
 jQuery(".pp_pic_holder").find(\'.pp_details .pp_download_place\').html(\'Download\');


You can download the above code also from gist:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s