WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 2 days 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:

  1. When the user can't edit_theme_options and thus by default can't reach the Customizer.
  1. When the selected page for the privacy policy is unpublished, as unpublished pages can't be searched for by default in the menu customizer.
  1. 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)

44117.diff (1.7 KB) - added by dlh 5 weeks ago.

Download all attachments as: .zip

Change History (11)

@dlh
5 weeks ago

#1 @desrosj
5 weeks ago

  • Version changed from trunk to 4.9.6

Marking privacy bugs as introduced in 4.9.6.

#2 @desrosj
4 weeks ago

  • Milestone changed from 4.9.7 to 4.9.8

Moving all tickets in 4.9.7 to 4.9.8.

#3 @desrosj
2 weeks 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 @dlh
2 weeks 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.


2 weeks ago

#6 @westonruter
13 days 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 @westonruter
4 days ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 43343:

Privacy: Only link to menus panel in Customizer if selected privacy page can be accessed there.

Props dlh.
Fixes #44117.

#8 @westonruter
4 days ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for 4.9.7 consideration.

#9 @westonruter
4 days ago

  • Owner westonruter deleted
  • Status changed from reopened to assigned

#10 @SergeyBiryukov
2 days ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from assigned to closed

In 43358:

Privacy: Only link to menus panel in Customizer if selected privacy page can be accessed there.

Props dlh.
Merges [43343] to the 4.9 branch.
Fixes #44117.

Note: See TracTickets for help on using tickets.