Opened 15 years ago
Closed 14 years ago
#19854 closed defect (bug) (fixed)
themes.php doesn't show themes if using Mac-style CR EOL markers
| Reported by: | novasource | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Themes | Version: | 3.3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Apparently Macs by default only use CRs to mark end of lines.
If a child theme's style.css file was saved using this, which can happen in Dreamweaver, WordPress won't even show the child theme at wp-admin/themes.php. This has come up at http://wordpress.org/support/topic/child-themes-doesnt-show-up-in-mamp.
If EOL only with CR isn't supported, it would be nice to at least show a warning.
Attachments (3)
Change History (10)
#3
@
15 years ago
This probably also works:
$file_data = str_replace( array( "\r\n", "\r" ), "\n", $file_data );
#5
@
15 years ago
- Summary themes.php doesn't show child themes if using Mac-style CR EOL markers → themes.php doesn't show themes if using Mac-style CR EOL markers
Closed #20248 as duplicate
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This happens with plugins also.
Tracked it down to the regex in
get_file_data(). The line start/end metacharacters (^and$) require aLF(\n) in order to detect the start/end of a line - which of course isn't there if you just haveCR(\r). Fix seems relatively simple.