jett-theme/functions.php

33 lines
741 B
PHP
Raw Normal View History

2024-05-21 11:04:04 +00:00
<?php
/* Remove default CSS variables that come with Wordpress
https://github.com/WordPress/gutenberg/issues/56180#issuecomment-1819222376
*/
function custom_wp_theme_json_default( $theme_json ) {
$new_data = array(
'version' => 2,
'settings' => array(
'color' => array(
'palette' => array(),
2024-05-30 08:11:24 +00:00
'gradients' => array(),
),
'shadow' => array(
'presets' => array(),
),
'typography' => array(
'fontSizes' => array(),
),
'dimensions' => array(
'aspectRatios' => array(),
),
'spacing' => array(
'spacingScale' => array(
'steps' => 0,
),
),
2024-05-21 11:04:04 +00:00
),
);
return $theme_json->update_with( $new_data );
}
add_filter( 'wp_theme_json_data_default', 'custom_wp_theme_json_default' );