diff --git a/openphoto-wordpress.php b/openphoto-wordpress.php
index 9a6e7d2..fe47cf5 100644
--- a/openphoto-wordpress.php
+++ b/openphoto-wordpress.php
@@ -55,7 +55,7 @@ class WP_OpenPhoto {
curl_setopt_array($ch, $curl_options);
$response = curl_exec($ch);
curl_close($ch);
-
+
$response = json_decode($response);
$photos = $response->result;
$post_id = $_GET["post_id"];
@@ -95,16 +95,16 @@ class WP_OpenPhoto {
alignment = ' alignright ';
}
- //if (caption_text != "") {
+ if (caption_text != "") {
img += '[caption id="'+op_single+'" align="'+alignment + '" width="32" caption="'+caption_text+'"]';
- //aligment = '';
- //}
+ aligment = '';
+ }
img += '';
- //if (caption_text != "") {
+ if (caption_text != "") {
img += '[/caption]';
- //}
+ }
var win = window.dialogArguments || opener || parent || top;
win.send_to_editor(img);
@@ -113,6 +113,26 @@ class WP_OpenPhoto {
});
});
+
+