Skip to content

Commit

Permalink
Merge pull request #339 from thec4aa/develop
Browse files Browse the repository at this point in the history
feat: add random rotation button to lotsa blocks
  • Loading branch information
slambert authored Jul 12, 2024
2 parents f97e4dc + c34fee1 commit a0669bf
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,78 @@ wp.domReady( () => {
isDefault: false
} );

// Adding Random Rotation to Various Blocks

wp.blocks.registerBlockStyle('core/group', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/image', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/button', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/cover', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/column', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/list', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/media-text', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/paragraph', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/post-featured-image', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/quote', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );

wp.blocks.registerBlockStyle('core/separator', {
name: 'rotate-random',
label: 'Random Rotation',
isDefault: false
} );


// Query Loop Block Styles
// these cycle through background colors for the group blocks within them.

wp.blocks.registerBlockStyle('core/query', {
name: 'cycle-primary',
label: 'Primary Cycle',
Expand Down

0 comments on commit a0669bf

Please sign in to comment.