Procházet zdrojové kódy

:recycle: moving description into title

tags/1.0.3
J před 3 roky
rodič
revize
df19e232f3
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2
    2
      plugins/cia-endpoints/includes/reformat-blocks.php

+ 2
- 2
plugins/cia-endpoints/includes/reformat-blocks.php Zobrazit soubor

40
                 $id = end($class_pieces);
40
                 $id = end($class_pieces);
41
             }
41
             }
42
             // Format for lightbox wants an object
42
             // Format for lightbox wants an object
43
+            $title = wp_get_attachment_caption($id) . '\n' . get_post($id)->post_content;
43
             $parse_images[$id] = [
44
             $parse_images[$id] = [
44
                 'src' => $image->getAttribute('src'),
45
                 'src' => $image->getAttribute('src'),
45
                 'alt' => $image->getAttribute('alt'),
46
                 'alt' => $image->getAttribute('alt'),
46
-                'title' => wp_get_attachment_caption($id),
47
-                'description' => get_the_excerpt($id)
47
+                'title' => $title
48
             ];
48
             ];
49
         }
49
         }
50
         return $parse_images;
50
         return $parse_images;

Načítá se…
Zrušit
Uložit