Skip to content

Commit

Permalink
getGlobalStylesChanges was doing nothing! Removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Dec 3, 2023
1 parent 270c3f5 commit 3478160
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,6 @@ const translationMap = {
'typography.fontWeight': __( 'font weight' ),
};

/**
* Returns an array of translated strings describing high level global styles and settings.
*
* @param {Object} revision
* @param {Object} revision.settings Global styles settings.
* @param {Object} revision.styles Global styles.
* @return {string[] | []} An array of translated labels.
*/
export function getGlobalStylesChanges( { settings = {}, styles = {} } ) {
const changes = [];
if ( Object.keys( settings ).length > 0 ) {
changes.push( __( 'Global settings' ) );
}
Object.keys( styles ).forEach( ( key ) => {
if ( translationMap[ key ] ) {
changes.push( translationMap[ key ] );
}
} );

return changes;
}

function getTranslation( key, blockNames ) {
if ( translationMap[ key ] ) {
return translationMap[ key ];
Expand Down

0 comments on commit 3478160

Please sign in to comment.