Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prepend_attachment from filters run on content for post template parts #20360

Conversation

johnstonphilip
Copy link
Contributor

This PR is a follow-up to PR #20343 for issue #20342

Description

The need for all of the filters which run on the_content was discussed in #20343, and after testing each one, I discovered that only prepend_attachment appears to be unneeded in the post_template_part context. Since prepend_attachment only runs on post_type(s) set to be attachment, it is unnecessary in the this context. Because of that, I am removing it here.

However, all other filters applied have been tested and I found them to be necessary. See my discoveries in this comment:
#20343 (comment)

How has this been tested?

  1. I created a block based theme using a header.html template part, placed blocks, shortcodes, multi-line breaks, and more inside the header.html file.
  2. I viewed a page and confirmed that all of those things continued to work as expected.

Types of changes

Bug fix.

Checklist:

  • [✅] My code is tested.
  • [✅] My code follows the WordPress code style.
  • [✅] My code follows the accessibility standards.
  • [✅] My code has proper inline documentation.
  • [✅] I've included developer documentation if appropriate.
  • [✅] I've updated all React Native files affected by any refactorings/renamings in this PR.

…te parts

Remove prepend_attachment from filters run on content for post template parts

WordPress#20342
@epiqueras epiqueras merged commit c6821d7 into WordPress:master Feb 21, 2020
@github-actions github-actions bot added this to the Gutenberg 7.6 milestone Feb 21, 2020
@ellatrix ellatrix mentioned this pull request Jun 16, 2020
12 tasks
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.

2 participants