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 {
1) { echo '
'; @@ -155,7 +155,7 @@ class WP_OpenPhoto { echo ''. $i . ' '; } } - + if ($current_page < $total_pages) { echo ' '; } @@ -173,9 +173,7 @@ class WP_OpenPhoto { $tag->id = trim($tag->id); $selected = ""; if ( $tag->id==$m ) $selected = ' selected="selected"'; - echo ''; + if ($tag->count > 0) echo ''; } ?> @@ -284,14 +282,14 @@ class WP_OpenPhoto { echo ''; $thumbnail_width = 150; $thumbnail_height = 150; - echo '
'; + echo '
'; $medium_width = 300; $medium_height = 187; - echo '
'; + echo '
'; $large_width = 600; $large_height = 400; - echo '
'; - echo '
'; + echo '
'; + echo '
'; echo ''; echo ''; echo ''; @@ -500,4 +498,4 @@ class WP_OpenPhoto_Settings { } new WP_OpenPhoto; -require_once('openphoto-php/OpenPhotoOAuth.php'); +require_once('openphoto-php/OpenPhotoOAuth.php');