浏览代码

Merge branch 'dev' of craft-in-america/vue-wp into master

tags/1.0.2
maeda 3 年前
父节点
当前提交
2924c2403d
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 1
    0
      .drone.yml
  2. 3
    1
      plugins/cia-endpoints/includes/reformat-blocks.php

+ 1
- 0
.drone.yml 查看文件

@@ -64,6 +64,7 @@ trigger:
64 64
     status:
65 65
         # Only runs if the first pipeline was fully successful
66 66
         - success
67
+        # Only runs on the master branch
67 68
     branch:
68 69
         - master
69 70
 

+ 3
- 1
plugins/cia-endpoints/includes/reformat-blocks.php 查看文件

@@ -42,7 +42,9 @@
42 42
             // Format for lightbox wants an object
43 43
             $parse_images[$id] = [
44 44
                 'src' => $image->getAttribute('src'),
45
-                'title' => $image->getAttribute('alt'),
45
+                'alt' => $image->getAttribute('alt'),
46
+                'title' => wp_get_attachment_caption($id),
47
+                'description' => get_the_excerpt($id)
46 48
             ];
47 49
         }
48 50
         return $parse_images;

正在加载...
取消
保存