While reviewing #148 I noticed there was some code that was no longer being used. I tracked that down to #129, where we refactored a few things but left some code in place that wasn't actually being used.
While putting together this PR to remove that code, I also noticed we had missing escaping in one place and that a couple of our text strings we show could be translated slightly better, so all of those have been fixed here.
So the things this PR does:
Removes the code that references the screen_id, as the underlying code was removed in #129 but some code was left in place
Update the reset confirmation message to use the post type on the PHP side (instead of replacing that on the JS side) and add a translator comment for that
Add the post type to our reset message so it isn't hardcoded to always say post
Add escaping around the post type value
How to test the Change
Ensure you have a post type that is sortable (like the default page post type)
Add multiple items within this post type
Ensure you can sort these items by drag-and-drop
Go to the Help tab and click on the Simple Page Ordering tab
Ensure the reset message shows with the correct post type name
Ensure clicking on this link shows a confirmation dialog with a message that reflects the proper post type
Confirm this dialog and ensure post type sorting has been reset
Changelog Entry
Changed - Slightly change how some of our text is translated, passing in the post type
Fixed - Remove code that was no longer needed
Fixed - Add missing escaping
Description of the Change
While reviewing #148 I noticed there was some code that was no longer being used. I tracked that down to #129, where we refactored a few things but left some code in place that wasn't actually being used.
While putting together this PR to remove that code, I also noticed we had missing escaping in one place and that a couple of our text strings we show could be translated slightly better, so all of those have been fixed here.
So the things this PR does:
screen_id
, as the underlying code was removed in #129 but some code was left in placepost
How to test the Change
page
post type)Help
tab and click on theSimple Page Ordering
tabChangelog Entry
Credits
Props @dkotter
Checklist: