corvée(dépendances) ajoute Carbon Fields
This commit is contained in:
parent
135cc65eed
commit
62368587e5
459 changed files with 72750 additions and 26 deletions
25
web/vendor/htmlburger/carbon-fields/packages/metaboxes/containers/hooks.js
vendored
Normal file
25
web/vendor/htmlburger/carbon-fields/packages/metaboxes/containers/hooks.js
vendored
Normal 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 );
|
||||
} );
|
||||
Loading…
Add table
Add a link
Reference in a new issue