Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#28645 closed enhancement (invalid)

WP_DEFAULT_THEME falls back to twentyfourteen even if it doesn't exist

Reported by: atimmer's profile atimmer Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Bootstrap/Load Keywords: has-patch
Focuses: Cc:

Description

WP_DEFAULT_THEME is by default set on the latest twenty* release, when you build a website for a client none of the twenty* themes are present and there is only one theme. If there is only one theme present in the themes folder it would be better if WordPress fell back to that theme.

Attachments (4)

28645.patch (931 bytes) - added by gauravmittal1995 10 years ago.
Checks for the latest theme, If doesnt exist then uses the first available theme.
28645.2.patch (986 bytes) - added by gauravmittal1995 10 years ago.
Changed to adjust the empty array (No themes)
28645.3.patch (1011 bytes) - added by gauravmittal1995 10 years ago.
Added Spaces and braces.
28645.4.patch (995 bytes) - added by gauravmittal1995 10 years ago.
Complete Patch

Download all attachments as: .zip

Change History (14)

#1 @atimmer
10 years ago

  • Version changed from trunk to 3.0

WP_DEFAULT_THEME has been introduced in 3.0.

This ticket was mentioned in IRC in #wordpress-dev by SergeyBiryukov. View the logs.


10 years ago

@gauravmittal1995
10 years ago

Checks for the latest theme, If doesnt exist then uses the first available theme.

#3 @gauravmittal1995
10 years ago

  • Keywords has-patch added

#4 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.0

@gauravmittal1995
10 years ago

Changed to adjust the empty array (No themes)

@gauravmittal1995
10 years ago

Added Spaces and braces.

@gauravmittal1995
10 years ago

Complete Patch

#5 @SergeyBiryukov
10 years ago

  • Keywords commit added

#6 follow-up: @SergeyBiryukov
10 years ago

  • Keywords close 2nd-opinion added; commit removed

WP_DEFAULT_THEME is by default set on the latest twenty* release, when you build a website for a client none of the twenty* themes are present and there is only one theme.

Actually, I think removing default themes is a bad practice, since they are often an integral part of troubleshooting if something goes wrong with the current theme.

This is merely a fallback, I don't think we should make it more complex. If you remove the default theme, you should define WP_DEFAULT_THEME yourself in wp-config.php.

#7 in reply to: ↑ 6 @DrewAPicture
10 years ago

  • Keywords close 2nd-opinion removed
  • Milestone 4.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Replying to SergeyBiryukov:

WP_DEFAULT_THEME is by default set on the latest twenty* release, when you build a website for a client none of the twenty* themes are present and there is only one theme.

Actually, I think removing default themes is a bad practice, since they are often an integral part of troubleshooting if something goes wrong with the current theme.

This is merely a fallback, I don't think we should make it more complex. If you remove the default theme, you should define WP_DEFAULT_THEME yourself in wp-config.php.

I agree with this sentiment, though we might promote a better user experience (in a separate ticket) by adding logic to try to grab and install the default if it isn't currently available. From a support perspective, it's important to keep the default as a default theme, as it were.

It's the developer's responsibility to define a different default choice if the bundled themes are removed.

#8 @SergeyBiryukov
9 years ago

#29960 was marked as a duplicate.

#9 @ocean90
9 years ago

#31096 was marked as a duplicate.

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


8 years ago

Note: See TracTickets for help on using tickets.