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,21 @@
/**
* External dependencies.
*/
import { addFilter } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
/**
* The internal dependencies.
*/
import './style.scss';
addFilter( 'carbon-fields.media_gallery.metabox', 'carbon-fields/metaboxes', ( OriginalMediaGalleryField ) => ( props ) => {
return (
<OriginalMediaGalleryField
buttonLabel={ __( 'Select Attachments', 'carbon-fields-ui' ) }
mediaLibraryButtonLabel={ __( 'Use Attachments', 'carbon-fields-ui' ) }
mediaLibraryTitle={ __( 'Select Attachments', 'carbon-fields-ui' ) }
{ ...props }
/>
);
} );

View file

@ -0,0 +1,54 @@
/* ==========================================================================
Media Gallery
========================================================================== */
.cf-media-gallery__inner {
.postbox & {
border: 1px solid $wp-color-gray-light-500;
}
}
.cf-media-gallery__actions {
.postbox & {
border-top: 1px solid $wp-color-gray-light-500;
}
.cf-container-term-meta & {
padding-left: 0;
}
}
.cf-media-gallery__list {
.cf-container-term-meta & {
margin: 0 -8px;
max-height: 285px;
}
}
.cf-media-gallery__item {
.cf-container-term-meta & {
flex-basis: 20%;
}
}
.cf-media-gallery__item-inner {
.postbox &,
.cf-container-term-meta & {
border: 1px solid $wp-color-gray-light-500;
}
}
.cf-media-gallery__item-preview {
.postbox &,
.cf-container-term-meta & {
background-color: $wp-color-gray-light-200;
}
}
.cf-media-gallery__item-name {
.postbox &,
.cf-container-term-meta & {
border-top: 1px solid $wp-color-gray-light-500;
background-color: $wp-color-gray-light-200;
}
}