Make WordPress Core

Opened 13 years ago

Closed 12 years ago

Last modified 10 years ago

#27630 closed defect (bug) (fixed)

Static front page opt-in via customizer

Reported by: Clorith Owned by: SergeyBiryukov
Priority: normal Milestone: 4.2
Component: Administration Version: 3.8.1
Severity: normal Keywords: has-patch commit
Cc: Focuses: ui, administration

Description

The static front page option is hidden under Settings > Reading if there are no pages available, but in the Customize screen this shows labels with no select boxes, giving the impression of something being broken.

Attached patch replicates the behavior of the settings page by only showing the static front page group if there exists any pages by doing a if ( get_pages() ) check

Attachments (1)

27630.patch​ (3.5 KB ) - added by Clorith 13 years ago.

Download all attachments as: .zip

Change History (12)

@Clorith
13 years ago

#1 follow-up: @Clorith
13 years ago

  • Keywords has-patch added

#3 @Clorith
13 years ago

  • Summary Static front page opt-in via widgets → Static front page opt-in via customizer

#4 in reply to: ↑ 1 ; follow-up: @ElectricFeet
12 years ago

Replying to Clorith:
Could you tell me if this code resolves the inconsistency that I reported here: ​http://wordpress.org/support/topic/inconsistency-in-how-wordpress-saves-front-page-options?replies=1 ?

I see that it substitutes the Customizer code with a lot of the Settings > Reading code, so it should fix that problem, but I'm a PHP newbie so cannot be sure.

If it doesn't, I'll open a new ticket for that inconsistency.

#5 in reply to: ↑ 4 ; follow-up: @Clorith
12 years ago

Replying to ElectricFeet:

Replying to Clorith:
Could you tell me if this code resolves the inconsistency that I reported here: ​http://wordpress.org/support/topic/inconsistency-in-how-wordpress-saves-front-page-options?replies=1 ?

I see that it substitutes the Customizer code with a lot of the Settings > Reading code, so it should fix that problem, but I'm a PHP newbie so cannot be sure.

If it doesn't, I'll open a new ticket for that inconsistency.

Sorry for the delayed response.

My patch actually removes the option from the customize screen altogether if there are no pages on your site, so it would be a different case than the one you've discovered.

#6 @danielbachhuber
12 years ago

  • Milestone Awaiting Review → Future Release

Not to hijack the thread, but I thought it might be better than creating a second ticket. Customizer says:

Your theme supports a static front page.

What if remove_theme_support( 'static-front-page' ) removed support entirely (e.g. removed the option, didn't register the Customizer Section, etc.) ?

#7 @Clorith
12 years ago

Not a bad idea, but we'd still need the check in place as some themes support both and we'd want to avoid the "broken" look when they do support a static page.

#8 in reply to: ↑ 5 @ElectricFeet
12 years ago

Replying to Clorith:

Replying to ElectricFeet:

Replying to Clorith:
Could you tell me if this code resolves the inconsistency that I reported here: ​http://wordpress.org/support/topic/inconsistency-in-how-wordpress-saves-front-page-options?replies=1 ?

I see that it substitutes the Customizer code with a lot of the Settings > Reading code, so it should fix that problem, but I'm a PHP newbie so cannot be sure.

If it doesn't, I'll open a new ticket for that inconsistency.

Sorry for the delayed response.

My patch actually removes the option from the customize screen altogether if there are no pages on your site, so it would be a different case than the one you've discovered.

Apologies for the delay in responding. Thanks for the reply Clorith.

I think I need to open another ticket...

#9 @celloexpressions
12 years ago

  • Keywords commit added
  • Milestone Future Release → 4.2

27630.patch​ fixes this ticket and still applies cleanly.

#10 @SergeyBiryukov
12 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 31234:

Customizer: Replicate behavior from options-reading.php and hide front page options if there are no pages.

props Clorith.
fixes #27630.

This ticket was mentioned in ​Slack in #core by drew. ​View the logs.


10 years ago

Note: See TracTickets for help on using tickets.