- πΊπΈUnited States rpayanm
You have to create a module like you are building a new gutenberg block:
and inside your index.es6.js paste this:
const { addFilter } = wp.hooks; addFilter( 'blocks.registerBlockType', 'name-of-your-module/extend-file-block', function (settings, name) { if (name === 'core/file') { settings.attributes.showDownloadButton.default = false; } return settings; });
npm run build
and it is done.
- πΊπΈUnited States brianbrarian
Thanks, @rpayanm! That will get me started.
- πΊπΈUnited States brianbrarian
I'm finally getting back to this, and am changing this issue from a support request to a feature request.
The devs I work with were able to change the default setting for "Show download button" to off, so that part has been resolved for me, but changing the default setting for "Show inline embed" for PDFs to off doesn't appear to be possible.
I was told by my devs that the option for an "off" default needs to be provided by the WordPress Gutenberg project first. See this WP issue: https://github.com/WordPress/gutenberg/issues/34825