1795 | | if ( $captiontag && trim($attachment->post_excerpt) ) { |
| 1795 | if ( $captiontag && trim( $attachment->post_excerpt ) ) { |
| 1796 | /** |
| 1797 | * Filters the gallery attachments caption. |
| 1798 | * |
| 1799 | * Filter that can be used for extend, edit, reformat and etc. the caption of certain attachment in a gallery. |
| 1800 | * The filter "id" argument gives you the opportunity to select specific attachment in the gallery. |
| 1801 | * |
| 1802 | * @since 5.1 |
| 1803 | * |
| 1804 | * @param string $attachment->post_excerpt Contains the caption value entered via the media library. |
| 1805 | * @param int $id Contains the post ID of the attachment. |
| 1806 | */ |
| 1807 | $gallery_caption = wptexturize( apply_filters( 'gallery_caption', $attachment->post_excerpt, $id ) ); |
| 1808 | |