Opened 3 years ago
Last modified 3 years ago
#54580 reopened feature request
Latest Posts Gutenberg Block not supporting args filter.
Reported by: | 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: |
Description
Shouldn't we add the filter for recent posts widget arguments in the Latest Posts Block?
<?php $args = apply_filters( 'widget_posts_args', $args );
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)
Change History (6)
#2
@
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.
This ticket was mentioned in PR #2197 on WordPress/wordpress-develop by martinjankov.
3 years ago
#4
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/54580
#5
@
3 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
https://github.com/WordPress/gutenberg/pull/38283
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 https://github.com/WordPress/gutenberg? Thanks!