From cedf0e4cfe2453a0db322df6e9f6d7483012b82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Thu, 18 Nov 2021 17:31:13 +0100 Subject: [PATCH] User to Custom --- .../src/components/global-styles/hooks.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/hooks.js b/packages/edit-site/src/components/global-styles/hooks.js index 361a2556e0d4d..02ad1ebdf2f7b 100644 --- a/packages/edit-site/src/components/global-styles/hooks.js +++ b/packages/edit-site/src/components/global-styles/hooks.js @@ -218,7 +218,7 @@ export function getSupportedGlobalStylesPanels( name ) { } export function useColorsPerOrigin( name ) { - const [ userColors ] = useSetting( 'color.palette.user', name ); + const [ customColors ] = useSetting( 'color.palette.user', name ); const [ themeColors ] = useSetting( 'color.palette.theme', name ); const [ defaultColors ] = useSetting( 'color.palette.core', name ); return useMemo( () => { @@ -235,18 +235,18 @@ export function useColorsPerOrigin( name ) { colors: themeColors, } ); } - if ( userColors && userColors.length ) { + if ( customColors && customColors.length ) { result.push( { - name: __( 'User' ), - colors: userColors, + name: __( 'Custom' ), + colors: customColors, } ); } return result; - }, [ userColors, themeColors, defaultColors ] ); + }, [ customColors, themeColors, defaultColors ] ); } export function useGradientsPerOrigin( name ) { - const [ userGradients ] = useSetting( 'color.gradients.user', name ); + const [ customGradients ] = useSetting( 'color.gradients.user', name ); const [ themeGradients ] = useSetting( 'color.gradients.theme', name ); const [ defaultGradients ] = useSetting( 'color.gradients.core', name ); return useMemo( () => { @@ -263,12 +263,12 @@ export function useGradientsPerOrigin( name ) { gradients: themeGradients, } ); } - if ( userGradients && userGradients.length ) { + if ( customGradients && customGradients.length ) { result.push( { - name: __( 'User' ), - gradients: userGradients, + name: __( 'Custom' ), + gradients: customGradients, } ); } return result; - }, [ userGradients, themeGradients, defaultGradients ] ); + }, [ customGradients, themeGradients, defaultGradients ] ); }