[wp-trac] [WordPress Trac] #33521: manage_${post_type}_posts_columns parameters shifted
WordPress Trac
noreply at wordpress.org
Sun Jun 22 19:24:39 UTC 2025
#33521: manage_${post_type}_posts_columns parameters shifted
---------------------------------------+-----------------------------
Reporter: Cybr | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Taxonomy | Version: 4.3
Severity: minor | Resolution:
Keywords: has-patch needs-test-info | Focuses: administration
---------------------------------------+-----------------------------
Changes (by SirLouen):
* keywords: reporter-feedback has-patch needs-testing => has-patch needs-
test-info
Comment:
Replying to [comment:9 Cybr]:
> In the example in the first post, `add_action( "manage_{$type}_columns",
array( $this, 'add_column'), 10, 1 );` now accepts `$slug` too
(`category`, `post_tag`).
>
> With the note of being backwards compatible (as per since WP2.1.9), it
accepts both `edit-category` as `category`.
>
> It now also accepts both the action and the filter for
`manage_{$this->screen->taxonomy}_custom_column`. Needs further testing,
but it should work as intended without duplicate outputs.
After inspecting the code, the problem I find and probably happend to
@DrewAPicture back in the day, is that is hard to figure out something at
a first glance without going deeper into your context
My recommendation for this kind of scenarios is to
[https://make.wordpress.org/test/2025/05/15/building-the-testing-use-case
/#the-hook build a Testing Use Case], in this case, multiple, because we
must be covering the different scenarios that these 3 hooks are providing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33521#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list