Changeset 55246 for trunk/src/wp-includes/blocks/latest-posts.php
- Timestamp:
- 02/07/2023 07:01:56 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/latest-posts.php
r53377 r55246 56 56 } 57 57 58 $query = new WP_Query ;58 $query = new WP_Query(); 59 59 $recent_posts = $query->query( $args ); 60 60 … … 174 174 remove_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 ); 175 175 176 $class = 'wp-block-latest-posts__list'; 177 176 $classes = array( 'wp-block-latest-posts__list' ); 178 177 if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) { 179 $class .= ' is-grid'; 180 } 181 178 $classes[] = 'is-grid'; 179 } 182 180 if ( isset( $attributes['columns'] ) && 'grid' === $attributes['postLayout'] ) { 183 $class .= ' columns-' . $attributes['columns']; 184 } 185 181 $classes[] = 'columns-' . $attributes['columns']; 182 } 186 183 if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) { 187 $class .= ' has-dates'; 188 } 189 184 $classes[] = 'has-dates'; 185 } 190 186 if ( isset( $attributes['displayAuthor'] ) && $attributes['displayAuthor'] ) { 191 $class .= ' has-author'; 192 } 193 194 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) ); 187 $classes[] = 'has-author'; 188 } 189 if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { 190 $classes[] = 'has-link-color'; 191 } 192 193 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); 195 194 196 195 return sprintf(
Note: See TracChangeset
for help on using the changeset viewer.