Skip to content

Commit

Permalink
removes unnecessary duotone fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bacoords committed Apr 25, 2024
1 parent 102a266 commit eb329dc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions inc/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ function theme_setup() {
* @link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#disabling-the-default-block-patterns
*/
remove_theme_support( 'core-block-patterns' );

/**
* Remove duotone filter SVGs from loading on the frontend if default
* and custom duotones are disabled.
*/
$theme_json_color_settings = wp_get_global_settings( array( 'color' ) );

if ( ! $theme_json_color_settings['customDuotone'] && ! $theme_json_color_settings['defaultDuotone'] ) {
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
remove_action( 'in_admin_header', 'wp_global_styles_render_svg_filters' );
}
}
add_action( 'after_setup_theme', __NAMESPACE__ . '\theme_setup' );

Expand Down
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Most of the theme setup is handled in the `inc/*.php` files. This includes:
- Enqueueing scripts and styles, including block-specific styles
- Any custom theme options
- Replacing the WordPress Logo and colors on the login screen with the site logo and colors
- Removing duotone SVG filters from loading on the frontend

## Theme.json

Expand Down

0 comments on commit eb329dc

Please sign in to comment.