@hamworks/wp-block-filters
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

@hamworks/wp-block-filters

Installation

Install the module

npm install @hamworks/wp-block-filters --save

API

createAttributesFilter

React hooks for post meta.

Parameters

  • blockName string: block name.
  • newAttributes : object attributes to override.

Returns

  • Function: Filter function for

Examples

jsx
import { addFilter } from '@wordpress/hooks';
import { createAttributesFilter } from '@hamworks/wp-block-filters';

addFilter(
	'blocks.registerBlockType',
	'my-plugin/media-text',
	createAttributesFilter('core/media-text', {
        isStackedOnMobile: {
			type: "boolean",
			default: true
		},
    })
);

Dependencies (0)

    Dev Dependencies (10)

    Package Sidebar

    Install

    npm i @hamworks/wp-block-filters

    Weekly Downloads

    0

    Version

    0.0.4

    License

    GPL-3.0+

    Unpacked Size

    9.04 kB

    Total Files

    12

    Last publish

    Collaborators

    • kanakita
    • torounit
    • redamoon
    • chiilog
    • gouten5010
    • h2ham