diff --git a/openphoto-wordpress.php b/openphoto-wordpress.php index 07a71bd..238ae9b 100644 --- a/openphoto-wordpress.php +++ b/openphoto-wordpress.php @@ -38,7 +38,6 @@ class WP_OpenPhoto { $openphoto = get_option('openphoto_wordpress_settings'); $client = new OpenPhotoOAuth(str_replace('http://','',$openphoto['host']),$openphoto["oauth_consumer_key"],$openphoto["oauth_consumer_secret"],$openphoto["oauth_token"],$openphoto["oauth_token_secret"]); - $client = new OpenPhotoOAuth(str_replace('http://','',$openphoto['host'])); // get photos $sizes['thumbnail']['w'] = get_option('thumbnail_size_w'); @@ -77,11 +76,12 @@ class WP_OpenPhoto { caption_text.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); url_text = parent_el.find('.url-text').val(); alignment = parent_el.find('.alignment-area input[type="radio"]]:checked').val(); - size = parent_el.find('.size-area input[type="radio"]]:checked').val(); + size_height = parent_el.find('.size-area input[type="radio"]]:checked').attr('data-image-height'); + size_width = parent_el.find('.size-area input[type="radio"]]:checked').attr('data-image-width'); size_alt = parent_el.find('.size-area input[type="radio"]]:checked').attr('alt'); size_class = 'size-' + size; - height = 100; - width = 150; + height = size_height; + width = size_width; op_single = parent_el.find('#op-single').attr('name'); img = ''; @@ -139,7 +139,7 @@ class WP_OpenPhoto {