corvée(dépendances) ajoute Carbon Fields

This commit is contained in:
gcch 2024-08-09 18:45:01 +02:00
commit 62368587e5
459 changed files with 72750 additions and 26 deletions

View file

@ -0,0 +1,25 @@
/**
* External dependencies.
*/
import { compose } from '@wordpress/compose';
import { addFilter } from '@wordpress/hooks';
/**
* Carbon Fields dependencies.
*/
import { withFilters } from '@carbon-fields/core';
/**
* Internal dependencies.
*/
import withContainer from '../hocs/with-container';
/**
* Extends the containers with necessary hooks.
*/
addFilter( 'carbon-fields.register-container-type', 'carbon-fields/metaboxes', ( type, context, component ) => {
return compose(
withContainer,
withFilters( `carbon-fields.${ type }.${ context }` )
)( component );
} );