[wp-trac] [WordPress Trac] #59591: Missing checks for pattern files trigger (invisible) PHP warnings

WordPress Trac noreply at wordpress.org
Fri Oct 13 15:48:41 UTC 2023


#59591: Missing checks for pattern files trigger (invisible) PHP warnings
---------------------------------------+--------------------------
 Reporter:  afercia                    |       Owner:  (none)
     Type:  defect (bug)               |      Status:  reviewing
 Priority:  normal                     |   Milestone:  6.4
Component:  Themes                     |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  has-screenshots has-patch  |     Focuses:  performance
---------------------------------------+--------------------------

Comment (by flixos90):

 Replying to [comment:14 afercia]:
 > Question related to one more scenario:
 > - As a site owner, I create my own custom pattern file.
 > - I upload it via FTP to my active theme `patterns` directory.
 > - I would expect my new pattern to just work.
 >
 > What happens in this case?

 In order to make direct changes to the theme (a.k.a. develop the theme),
 you should define the `WP_DEVELOPMENT_MODE` constant and set it to "theme"
 in `wp-config.php`. This will ensure any theme specific caching is
 disabled while you're making changes.

 Once you're done making changes, you could unset the constant again. Or,
 if you're regularly making changes to the theme on that site, you could
 keep the constant set like that permanently, which would be a tradeoff
 between development convenience vs the additional performance boost of
 caching certain theme files.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59591#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list