Opened 7 years ago
Closed 7 years ago
#44117 closed defect (bug) (fixed)
Privacy: Don't always link to the menu customizer
Reported by: | dlh | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.9.7 | Priority: | normal |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | has-patch gdpr commit fixed-major |
Focuses: | administration | Cc: |
Description
Currently, after saving the page for the site's privacy policy, a message displays with "Remember to update your menus!" that links to the menu customizer.
In some situations, it might not make sense to include this message:
- When the user can't
edit_theme_options
and thus by default can't reach the Customizer.
- When the selected page for the privacy policy is unpublished, as unpublished pages can't be searched for by default in the menu customizer.
- When the current theme doesn't support menus, as the mention of a menu might confuse the user.
The attached patch would skip the menu prompt after saving the setting in these cases.
Of these cases, (3) seems to me like the most debatable, as users can still create menus in the Customizer even if the theme doesn't register a menu location. But (1) and (2) seem to me on firmer ground.
A lighter touch could also be taken than what's in the patch, such as a message like "Remember to update your menus after the page is published!" for case (2).
Attachments (1)
Change History (11)
#3
@
7 years ago
- Focuses administration added
- Keywords commit added
- Milestone changed from 4.9.8 to 4.9.7
@dlh this looks good to me and tests well.
Only nit pick I have is that I believe the rule with multi-line conditionals is one per line leaving the first conditional on the same line as the if(
. I couldn't find the rule stated anywhere in WPCS ruleset, or in the handbook, though.
#4
@
7 years ago
I believe the rule with multi-line conditionals is one per line leaving the first conditional on the same line as the if(.
Intriguing! I'm happy to follow whatever the standard is, although I confess I'm curious about what the advantages are of leaving the first condition alongside the if
. Is it possible to get an official ruling?
This ticket was mentioned in Slack in #core-customize by dlh. View the logs.
7 years ago
#6
@
7 years ago
The changes make sense to me. At first I thought the customize
cap should be checked but it's better to use edit_theme_options
since that is the cap for menus in the Customizer, and customize
is a meta cap for edit_theme_options
.
#7
@
7 years ago
- Owner set to westonruter
- Resolution set to fixed
- Status changed from new to closed
In 43343:
Marking privacy bugs as introduced in 4.9.6.