Skip to content

Instantly share code, notes, and snippets.

@Garth619
Last active June 23, 2022 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Garth619/1a234526aa2a4e47310e3d03a4f14d86 to your computer and use it in GitHub Desktop.
Save Garth619/1a234526aa2a4e47310e3d03a4f14d86 to your computer and use it in GitHub Desktop.
/**
* This theme only needs a small list of blocks enabled
*
* https://developer.wordpress.org/block-editor/reference-guides/core-blocks/
*
* Also see theme.json in the theme root. Options are restricted there too to follow specific brand standards.
*/
function allowed_block_types()
{
return array(
'core/audio',
'core/block',
'core/button',
'core/buttons',
'core/column',
'core/columns',
'core/heading',
'core/html',
'core/image',
'core/group',
'core/list',
'core/list-item',
'core/missing',
'core/paragraph',
//'core/pattern',
'core/post-author',
'core/post-featured-image',
'core/preformatted',
'core/separator',
'core/shortcode',
'core/spacer',
'core/table',
'core/video',
'gravityforms/form'
);
}
add_filter('allowed_block_types', 'allowed_block_types');
{
"version": "2",
"settings": {
"appearanceTools": false,
"border": {
"color": false,
"radius": false,
"style": false,
"width": false
},
"color": {
"background": false,
"custom": false,
"customDuotone": false,
"customGradient": false,
"defaultGradients": false,
"defaultPalette": false,
"duotone": [],
"gradients": [],
"link": false,
"text": false,
"palette": [
{
"slug": "ilawyerblue",
"color": "#071945",
"name": "iLawyer Blue"
},
{
"slug": "ilawyerbluetwo",
"color": "#0a51cc",
"name": "iLawyer Blue Two"
},
{
"slug": "ilawyerorange",
"color": "#ff7557",
"name": "iLawyer Orange"
},
{
"slug": "ilawyerorangetwo",
"color": "#e15030",
"name": "iLawyer Orange Two"
}
]
},
"layout": {
"contentSize": "850px"
},
"spacing": {
"blockGap": true,
"margin": true,
"padding": true,
"units": [
"px",
"em",
"rem",
"vh",
"vw"
]
},
"typography": {
"customFontSize": false,
"dropCap": false,
"fontFamilies": [],
"fontSizes": [],
"fontStyle": false,
"fontWeight": false,
"letterSpacing": false,
"lineHeight": false,
"textDecoration": false,
"textTransform": false
},
"blocks": {
"core/heading": {
"spacing": {
"margin": false
}
},
"core/button": {
"border": {
"radius": false,
"style": false,
"width": false
},
"spacing": {
"padding": false
},
"color": {
"background": false,
"text": false
}
}
}
},
"styles": {
"color": {
"background": "",
"gradient": "",
"text": "var(--wp--preset--color--ilawyerblue)"
},
"typography": {
"fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif",
"slug": "system-fonts",
"name": "System Fonts",
"fontSize": "17px",
"lineHeight": "30px"
},
"blocks": {
"core/button": {
"border": {
"radius": "100px",
"style": false,
"width": false
},
"color": {
"text": "#fff",
"gradient": "linear-gradient(180deg, var(--wp--preset--color--ilawyerorange), var(--wp--preset--color--ilawyerorangetwo))"
},
"typography": {
"fontSize": "18px",
"fontWeight": "700"
}
},
"core/list": {}
},
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--ilawyerblue)"
},
"typography": {
"fontWeight": "700"
}
},
"h1": {
"typography": {
"lineHeight": "35px",
"fontWeight": "700"
}
},
"h2": {
"color": {
"text": "var(--wp--preset--color--ilawyerblue)"
},
"typography": {
"fontSize": "25px",
"lineHeight": "35px",
"fontWeight": "700"
}
},
"h3": {
"color": {
"text": "var(--wp--preset--color--ilawyerbluetwo)"
},
"typography": {
"fontSize": "21px",
"lineHeight": "30px",
"fontWeight": "700"
}
},
"h4": {
"color": {
"text": "var(--wp--preset--color--ilawyerorangetwo)"
},
"typography": {
"fontSize": "18px",
"lineHeight": "27px",
"fontWeight": "700"
}
},
"h5": {},
"h6": {}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment