Skip to content

Commit

Permalink
[MOOSE-169]: [MOOSE-169] Remove unnecessary block_support() features.…
Browse files Browse the repository at this point in the history
… These are already applied for block themes.
  • Loading branch information
dpellenwood committed Nov 22, 2024
1 parent 7b715ae commit 5517500
Showing 1 changed file with 5 additions and 37 deletions.
42 changes: 5 additions & 37 deletions wp-content/plugins/core/src/Theme_Config/Theme_Support.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class Theme_Support {
* @action after_setup_theme
*/
public function add_theme_supports(): void {
$this->support_thumbnails();
$this->support_title_tag();
$this->support_responsive_embeds();
$this->support_html5();
$this->remove_support_block_widgets();
}

Expand All @@ -22,45 +18,17 @@ public function disable_block_patterns(): void {
remove_theme_support( 'core-block-patterns' );
}

/**
* Disable Openverse Media Category.
*
* @param array $settings
*/
public function disable_openverse_media_category( array $settings ): array {
$settings['enableOpenverseMediaCategory'] = false;

return $settings;
}

/**
* Supports: enable Featured Images
*/
private function support_thumbnails(): void {
add_theme_support( 'post-thumbnails' );
}

/**
* Supports: enable Document Title Tag
*/
private function support_title_tag(): void {
add_theme_support( 'title-tag' );
}

private function support_responsive_embeds(): void {
add_theme_support( 'responsive-embeds' );
}

/**
* Support: switch core WordPress markup to output valid HTML5
*/
private function support_html5(): void {
add_theme_support( 'html5', [
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'script',
'style',
] );
}

/**
* Disable Block Editor Widget Support
*/
Expand Down

0 comments on commit 5517500

Please sign in to comment.