Template Editing Mode: Fix checks in 'site-editor.php'#4893
Closed
Mamaduka wants to merge 2 commits intoWordPress:trunkfrom
Closed
Template Editing Mode: Fix checks in 'site-editor.php'#4893Mamaduka wants to merge 2 commits intoWordPress:trunkfrom
Mamaduka wants to merge 2 commits intoWordPress:trunkfrom
Conversation
Mamaduka
commented
Jul 24, 2023
Comment on lines
+26
to
+28
| $is_template_part = isset( $_GET['postType'] ) && 'wp_template_part' === sanitize_key( $_GET['postType'] ); | ||
| $is_template_part_path = isset( $_GET['path'] ) && 'wp_template_partall' === sanitize_key( $_GET['path'] ); | ||
| $is_template_part_editor = $is_template_part || $is_template_part_path; |
Member
Author
There was a problem hiding this comment.
Both checks are needed now. When editing a template part query will contain wp_template_part, and when viewing the list page, it will be /wp_template_part/all.
The slashes are removed by sanitize_key.
Contributor
|
Hey @Mamaduka is this PR meant for WP 6.3? |
Member
Author
|
@tellthemachines, I think we should land this in 6.3; otherwise, we'll have annoying regression for hybrid themes. |
Contributor
|
Committed in https://core.trac.wordpress.org/ticket/58889 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trac ticket: https://core.trac.wordpress.org/ticket/58889
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.