Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #54645, comment 4


Ignore:
Timestamp:
05/28/2022 05:52:14 PM (2 years ago)
Author:
lopo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54645, comment 4

    initial v1  
    11To clarify: having a numerical name (in `style.css`) doesn't seem to create problems, while having a numerical ''folder name'' does.
    22
    3 The patch fixes this by making sure that we cast the theme dirname to a string when creating the `WP_Theme` object.
     3The patch fixes this by making sure that we cast the theme dirname to a string ~~when creating the `WP_Theme` object~~ when assigning to the `stylesheet` property in the `WP_Theme` contructor.
    44
    55To test, rename e.g. `wp-content/themes/twentytwentyone` to `wp-content/themes/2021`.
     
    1313- editing a post in the block editor shows the supported features e.g. the featured image
    1414
    15 I'm removing the `needs-unit-tests` keyword since there's currently no default theme with a numerical dirname to be retrieved by a call to  `wp_get_themes()`.
     15~~ I'm removing the `needs-unit-tests` keyword since there's currently no default theme with a numerical dirname to be retrieved by a call to  `wp_get_themes()`~~ Unit test added after change of approach.