$attributes['postsToShow'], 'post_status' => 'publish', 'order' => $attributes['order'], 'orderby' => $attributes['orderBy'], 'suppress_filters' => false, ); $block_core_latest_posts_excerpt_length = $attributes['excerptLength']; add_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 ); if ( isset( $attributes['categories'] ) ) { $args['category'] = $attributes['categories']; } $recent_posts = get_posts( $args ); $list_items_markup = ''; foreach ( $recent_posts as $post ) { $list_items_markup .= '