IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1580 | 1580 | } |
1581 | 1581 | |
1582 | 1582 | $html5 = current_theme_supports( 'html5', 'gallery' ); |
1583 | | $atts = shortcode_atts( array( |
1584 | | 'order' => 'ASC', |
1585 | | 'orderby' => 'menu_order ID', |
1586 | | 'id' => $post ? $post->ID : 0, |
1587 | | 'itemtag' => $html5 ? 'figure' : 'dl', |
1588 | | 'icontag' => $html5 ? 'div' : 'dt', |
1589 | | 'captiontag' => $html5 ? 'figcaption' : 'dd', |
1590 | | 'columns' => 3, |
1591 | | 'size' => 'thumbnail', |
1592 | | 'include' => '', |
1593 | | 'exclude' => '', |
1594 | | 'link' => '' |
| 1583 | $atts = shortcode_atts( array( |
| 1584 | 'order' => 'ASC', |
| 1585 | 'orderby' => 'menu_order ID', |
| 1586 | 'id' => $post ? $post->ID : 0, |
| 1587 | 'itemtag' => $html5 ? 'figure' : 'dl', |
| 1588 | 'icontag' => $html5 ? 'div' : 'dt', |
| 1589 | 'captiontag' => $html5 ? 'figcaption' : 'dd', |
| 1590 | 'columns' => 3, |
| 1591 | 'container_class' => '', |
| 1592 | 'item_class' => '', |
| 1593 | 'size' => 'thumbnail', |
| 1594 | 'include' => '', |
| 1595 | 'exclude' => '', |
| 1596 | 'link' => '' |
1595 | 1597 | ), $attr, 'gallery' ); |
1596 | 1598 | |
1597 | 1599 | $id = intval( $atts['id'] ); |
1598 | 1600 | |
| 1601 | $container_class = explode( ' ', $atts['container_class'] ); |
| 1602 | |
| 1603 | if ( ! is_array( $container_class ) ) { |
| 1604 | $container_class = array( $container_class ); |
| 1605 | } |
| 1606 | |
| 1607 | $item_class = explode( ' ', $atts['item_class'] ); |
| 1608 | if ( ! is_array( $item_class ) ) { |
| 1609 | $item_class = array( $item_class ); |
| 1610 | } |
| 1611 | |
1599 | 1612 | if ( ! empty( $atts['include'] ) ) { |
1600 | 1613 | $_attachments = get_posts( array( 'include' => $atts['include'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) ); |
1601 | 1614 | |
… |
… |
|
1675 | 1688 | } |
1676 | 1689 | |
1677 | 1690 | $size_class = sanitize_html_class( $atts['size'] ); |
1678 | | $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>"; |
1679 | 1691 | |
| 1692 | $container_class = array_merge( array( |
| 1693 | 'gallery', |
| 1694 | 'galleryid-' . $id, |
| 1695 | 'gallery-columns-' . $columns, |
| 1696 | 'gallery-size-' . $size_class |
| 1697 | ), $container_class ); |
| 1698 | |
1680 | 1699 | /** |
| 1700 | * Filter the container classes |
| 1701 | * |
| 1702 | * @since 4.5.0 |
| 1703 | * |
| 1704 | * @param array $container_class Container Classes |
| 1705 | */ |
| 1706 | $container_class = apply_filters( 'gallery_container_class', $container_class ); |
| 1707 | |
| 1708 | $gallery_div = "<div id='$selector' class='" . implode( ' ', array_unique( $container_class ) ) . "'>"; |
| 1709 | |
| 1710 | /** |
1681 | 1711 | * Filter the default gallery shortcode CSS styles. |
1682 | 1712 | * |
1683 | 1713 | * @since 2.5.0 |
… |
… |
|
1704 | 1734 | if ( isset( $image_meta['height'], $image_meta['width'] ) ) { |
1705 | 1735 | $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape'; |
1706 | 1736 | } |
1707 | | $output .= "<{$itemtag} class='gallery-item'>"; |
| 1737 | |
| 1738 | $item_class = array_merge( array( 'gallery-item' ), $item_class ); |
| 1739 | |
| 1740 | /** |
| 1741 | * Filter the item classes |
| 1742 | * |
| 1743 | * @since 4.5.0 |
| 1744 | * |
| 1745 | * @param array $item_class Item Classes |
| 1746 | * @param array $atts Shortcode atts |
| 1747 | * @param WP_Post $attachment Current image |
| 1748 | */ |
| 1749 | $item_class = apply_filters( 'gallery_item_class', $item_class, $atts, $attachment ); |
| 1750 | |
| 1751 | $output .= "<{$itemtag} class='" . implode( ' ', array_unique( $item_class ) ) . "'>"; |
1708 | 1752 | $output .= " |
1709 | 1753 | <{$icontag} class='gallery-icon {$orientation}'> |
1710 | 1754 | $image_output |