-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix: Resetting template part causes notification saying it's been delete #62521
Fix: Resetting template part causes notification saying it's been delete #62521
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +98 B (+0.01%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Worked great! Tested for both resetting a template part and template for good measure. Video of template part: reset.notice.mov |
( item.has_theme_file || | ||
( item.templatePart && item.templatePart.has_theme_file ) ) | ||
); | ||
console.log( { items } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the console.log is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see that's what causing the static analysis error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message uses the correct text when the theme template part is reset.
The PR can be merged when the tests pass.
fae32ce
to
f27182d
Compare
…ete (#62521) Co-authored-by: jorgefilipecosta <[email protected]> Co-authored-by: carolinan <[email protected]> Co-authored-by: annezazu <[email protected]> Co-authored-by: ramonjd <[email protected]>
I just cherry-picked this PR to the wp/6.6-rc-1 branch to get it included in the next release: 0595c91 |
…ete (#62521) Co-authored-by: jorgefilipecosta <[email protected]> Co-authored-by: carolinan <[email protected]> Co-authored-by: annezazu <[email protected]> Co-authored-by: ramonjd <[email protected]>
Fixes: #62458.
cc: @annezazu
Addresses an issue where for template parts when a revert happens we say they were deleted.
Testing Instructions
With 2024 theme installed apply some changes to the header template part.
Go to the patterns section template part do do a reset.
Verify we say the template part was reset not deleted as before.