Skip to content

Revert "Fix media modal crash on WP 7.0 due to attachment filters wrapper change"#505

Merged
ockham merged 1 commit into
trunkfrom
revert-399-attachment-filters
Jul 16, 2026
Merged

Revert "Fix media modal crash on WP 7.0 due to attachment filters wrapper change"#505
ockham merged 1 commit into
trunkfrom
revert-399-attachment-filters

Conversation

@ockham

@ockham ockham commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Reverts #399.

That PR worked around a WP 7.0 change (core changeset 61757) that wrapped the media attachment filters in a container <div>, which changed the return value of toolbar.get( 'filters' ) from the AttachmentFilters view to a wrapper wp.media.View and crashed customizeFilters().

This has since been fixed upstream: Trac #64948 reverted the shape change in the attachment filters return value and implemented the accessibility improvement via CSS-based positioning instead (changeset 62326 on trunk, merged to the 7.0 branch in 62327). WP 7.0 final therefore ships with the original toolbar.get( 'filters' ) behavior, making the subview-traversal workaround unnecessary complexity.

This revert restores customizeFilters() to its previous implementation, which works on both WP < 7.0 and WP 7.0+.

Use of AI Tools

This PR was created with assistance from Claude Code (Anthropic).

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props bernhard-reiter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ockham
ockham merged commit aaa3476 into trunk Jul 16, 2026
19 checks passed
@ockham
ockham deleted the revert-399-attachment-filters branch July 16, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant