Make WordPress Core

Ticket #54580: 54580.diff

File 54580.diff, 480 bytes (added by martin7ba, 22 months ago)

Added filter for arguments for latest posts block

  • src/wp-includes/blocks/latest-posts.php

    diff --git a/src/wp-includes/blocks/latest-posts.php b/src/wp-includes/blocks/latest-posts.php
    index 00565cda6c..963b2e6526 100644
    a b function render_block_core_latest_posts( $attributes ) { 
    5454                $args['author'] = $attributes['selectedAuthor'];
    5555        }
    5656
     57        $args = apply_filters( 'widget_posts_args', $args );
     58
    5759        $recent_posts = get_posts( $args );
    5860
    5961        $list_items_markup = '';