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
15
web/vendor/htmlburger/carbon-fields/packages/metaboxes/utils/strip-compact-input-prefix.js
vendored
Normal file
15
web/vendor/htmlburger/carbon-fields/packages/metaboxes/utils/strip-compact-input-prefix.js
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Removes the prefix used to compact the input of Carbon Fields.
|
||||
*
|
||||
* @param {string} str
|
||||
* @return {string}
|
||||
*/
|
||||
export default function stripCompactInputPrefix( str ) {
|
||||
const { compactInput, compactInputKey } = window.cf.config;
|
||||
|
||||
if ( ! compactInput || str.indexOf( compactInputKey ) !== 0 ) {
|
||||
return str;
|
||||
}
|
||||
|
||||
return str.replace( new RegExp( `^${ compactInputKey }\\[(.+?)\\]` ), '$1' );
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue