Created
September 17, 2020 12:27
-
-
Save joppuyo/67683ebc4157873fb0ac53995e308412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeDropCap(settings, name) { | |
if (name !== 'core/paragraph') { | |
return settings; | |
} | |
let newSettings = Object.assign({}, settings); | |
if (newSettings.supports && | |
newSettings.supports.__experimentalFeatures && | |
newSettings.supports.__experimentalFeatures.typography && | |
newSettings.supports.__experimentalFeatures.typography.dropCap) { | |
newSettings.supports.__experimentalFeatures.typography.dropCap = false | |
} | |
return newSettings; | |
} | |
wp.hooks.addFilter('blocks.registerBlockType', 'sc/gb/remove-drop-cap', removeDropCap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment