Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #54552, comment 1


Ignore:
Timestamp:
12/02/2021 10:23:55 AM (3 years ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54552, comment 1

    initial v1  
    3636== Is a 'helper' method worth having?
    3737- This is a minimal and arguable improvement in readability.
    38 - There are currently 24 instances of `wp_get_theme()` in the Bundled Themes. Without additional 'helpers' for other `WP_Theme` methods, this would result using `wp_is_block_based_theme()` to check if it's block based, and `wp_get_theme()->` for everything else.
     38- There are currently 122 instances of `wp_get_theme()` in Core, including 24 in Bundled Themes. Without additional 'helpers' for other `WP_Theme` methods, this would result using `wp_is_block_based_theme()` to check if it's block based, and `wp_get_theme()->` for everything else.
    3939- IMO, this is likely going to result in using `wp_get_theme->is_block_based()` directly and the ultimate deprecation of `wp_is_block_based_theme()`.