Changeset 44262 for trunk/src/wp-includes/blocks/latest-posts.php
- Timestamp:
- 12/17/2018 03:35:21 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43891,43903,43919
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/blocks/latest-posts.php
r44177 r44262 14 14 */ 15 15 function render_block_core_latest_posts( $attributes ) { 16 $recent_posts = wp_get_recent_posts( 17 array( 18 'numberposts' => $attributes['postsToShow'], 19 'post_status' => 'publish', 20 'order' => $attributes['order'], 21 'orderby' => $attributes['orderBy'], 22 'category' => $attributes['categories'], 23 ) 16 $args = array( 17 'numberposts' => $attributes['postsToShow'], 18 'post_status' => 'publish', 19 'order' => $attributes['order'], 20 'orderby' => $attributes['orderBy'], 24 21 ); 22 23 if ( isset( $attributes['categories'] ) ) { 24 $args['categories'] = $attributes['categories']; 25 } 26 27 $recent_posts = wp_get_recent_posts( $args ); 25 28 26 29 $list_items_markup = ''; … … 31 34 $title = get_the_title( $post_id ); 32 35 if ( ! $title ) { 33 $title = __( '(Untitled)', ' gutenberg' );36 $title = __( '(Untitled)', 'default' ); 34 37 } 35 38 $list_items_markup .= sprintf(
Note: See TracChangeset
for help on using the changeset viewer.