Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#54580 reopened feature request

Latest Posts Gutenberg Block not supporting args filter.

Reported by: martin7ba's profile martin7ba Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.8.2
Component: Editor Keywords: reporter-feedback has-patch
Focuses: rest-api Cc:


Shouldn't we add the filter for recent posts widget arguments in the Latest Posts Block?

$args = apply_filters(

I didn't find it in the core wp-includes/blocks/latest-posts.php

This breaks the functionality in my plugin for hiding posts in the Recent Posts Widget.

Attachments (1)

54580.diff (480 bytes) - added by martin7ba 3 years ago.
Added filter for arguments for latest posts block

Download all attachments as: .zip

Change History (6)

#1 @SergeyBiryukov
3 years ago

  • Component changed from Widgets to Editor

Hi there, welcome to WordPress Trac! Thanks for the report.

Moving this to the Editor component for more visibility, as it seems to be more related to the Latest Posts block than the Recent Posts widget.

Also noting that this needs to be fixed in the block-library package upstream and then backported to core. Could you create an issue or PR at Thanks!

#2 @martin7ba
3 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Hi, thank you.

Well, the Latest Posts block is used as a Recent Widget in the Widgets Area now that the Widgets area was upgraded to use Gutenberg Blocks as widgets.

The changes need to be applied in the /wp-includes/blocks/latest-posts.php file.

I am still new to contributing to WP Core..once I read the how the PR are added on Git, I will try to create a PR there.

#3 @martin7ba
3 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

3 years ago

Added filter for arguments for latest posts block

This ticket was mentioned in PR #2197 on WordPress/wordpress-develop by martinjankov.

2 years ago

  • Keywords has-patch added

#5 @martin7ba
2 years ago

@SergeyBiryukov I mentioned this ticket and PR I had in the core-editor chat and they pointed out to me that all block related updates should be done in the Gutenberg repo.

Therefore I created new PR on the Gutenberg repo

Last edited 2 years ago by martin7ba (previous) (diff)
Note: See TracTickets for help on using tickets.