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 @@
<fieldset class="comment-container-holder container-<?php echo $this->get_id(); ?>"></fieldset>

View file

@ -0,0 +1,68 @@
<?php
$container_id = $this->get_id();
if ( ! isset( $container_css_class ) ) {
$container_css_class = 'generic-container';
}
?>
<div class="wrap carbon-<?php echo $container_css_class; ?>">
<h2><?php echo $this->title ?></h2>
<?php if ( $this->errors ) : ?>
<div class="error settings-error">
<?php foreach ( $this->errors as $error ) : ?>
<p><strong><?php echo $error; ?></strong></p>
<?php endforeach ?>
</div>
<?php elseif ( $this->notifications ) : ?>
<?php foreach ( $this->notifications as $notification ) : ?>
<div class="settings-error updated">
<p><strong><?php echo $notification ?></strong></p>
</div>
<?php endforeach ?>
<?php endif; ?>
<form method="post" id="<?php echo $container_css_class; ?>-form" enctype="multipart/form-data" action="">
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<?php do_action( "{$container_id}_before_fields" ); ?>
<div class="postbox carbon-box" id="<?php echo $this->get_id(); ?>">
<fieldset class="inside <?php echo $container_css_class; ?>-container container-<?php echo $this->get_id(); ?>"></fieldset>
</div>
<?php do_action( "{$container_id}_after_fields" ); ?>
</div>
<div id="postbox-container-1" class="postbox-container">
<?php do_action( "{$container_id}_before_sidebar" ); ?>
<div id="submitdiv" class="postbox">
<h3><?php _e( 'Actions', 'carbon-fields' ); ?></h3>
<div id="major-publishing-actions">
<div id="publishing-action">
<span class="spinner"></span>
<?php
$filter_name = 'carbon_fields_' . str_replace( '-', '_', sanitize_title( $this->title ) ) . '_button_label';
$button_label = apply_filters( $filter_name, __( 'Save Changes', 'carbon-fields' ) );
?>
<input type="submit" value="<?php echo esc_attr( $button_label ); ?>" name="publish" id="publish" class="button button-primary button-large">
</div>
<div class="clear"></div>
</div>
</div>
<?php do_action( "{$container_id}_after_sidebar" ); ?>
</div>
</div>
</div>
</form>
</div>

View file

@ -0,0 +1,3 @@
<div class="description description-wide" data-id="<?php echo $this->get_id(); ?>">
<fieldset class="container-<?php echo $this->get_id(); ?>" data-json="<?php echo urlencode( json_encode( $this->to_json( false ) ) ); ?>"></fieldset>
</div>

View file

@ -0,0 +1,3 @@
<?php
$container_css_class = 'network';
require( 'common/options-page.php' );

View file

@ -0,0 +1 @@
<fieldset class="container-<?php echo $this->get_id(); ?>"></fieldset>

View file

@ -0,0 +1,16 @@
<?php ob_start(); ?>
<fieldset class="container-<?php echo $this->get_id(); ?>"></fieldset>
<?php $html = ob_get_clean(); ?>
<?php if ( ! empty( $_GET['tag_ID'] ) ): ?>
<tr class="carbon-table-row">
<td></td>
<td>
<?php echo $html; ?>
</td>
</tr>
<?php else: ?>
<div class="form-field">
<?php echo $html; ?>
</div>
<?php endif; ?>

View file

@ -0,0 +1,3 @@
<?php
$container_css_class = 'theme-options';
require( 'common/options-page.php' );

View file

@ -0,0 +1,12 @@
<h2><?php echo $this->title; ?></h2>
<table class="form-table">
<tbody>
<tr>
<th></th>
<td>
<fieldset class="container-<?php echo $this->get_id(); ?>" data-profile-role="<?php echo $profile_role ?>"></fieldset>
</td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1,6 @@
<div class="carbon-container">
<fieldset class="container-<?php echo $this->get_id(); ?>" data-json="<?php echo urlencode( json_encode( $this->to_json( false ) ) ); ?>"></fieldset>
<?php if ( ! $this->has_fields() ) : ?>
<?php _e( 'No options are available for this widget.', 'carbon-fields' ); ?>
<?php endif; ?>
</div>

View file

@ -0,0 +1,42 @@
<style>
a.carbon-errors-dismiss { float: right; margin: 5px; text-decoration: none; color: #0073aa; }
a.carbon-errors-dismiss span.dashicons-dismiss { font-size: 14px; line-height: 20px; color: #b4b9be }
a.carbon-errors-dismiss:hover span.dashicons-dismiss { color: #cc0000 }
.carbon-errors-log .carbon-errors-more { display: none; }
.carbon-errors-log.expanded .carbon-errors-more { display: block; }
.carbon-errors-log.expanded .carbon-errors-expand { display: none; }
</style>
<script>
jQuery(function ($) {
var $container = $('.carbon-errors-log');
$('.carbon-errors-expand').on('click', function () {
$container.addClass('expanded');
});
$('.carbon-errors-dismiss').on('click', function () {
$container.slideUp();
carbon.docCookies.setItem(<?php echo json_encode( $hideErrorsCookieName ) ?>, "1", Infinity);
});
})
</script>
<div class="error carbon-errors-log">
<a href="#" class="carbon-errors-dismiss"><span class="dashicons dashicons-dismiss" style=" "></span>Dismiss</a>
<p>Your site seems to be slightly misconfigured. <p><a href="#" class="carbon-errors-expand">Tell me more</a></p>
<div class="carbon-errors-more">
<p>Carbon Fields library encountered errors that may prevent your custom fields or theme options to work properly. Here's a quick summary of the issue<?php echo $plural ?>: </p>
<ol>
<?php foreach ( $errors as $error ) : ?>
<li><?php echo htmlspecialchars( $error->getMessage() ) ?></li>
<?php endforeach ?>
</ol>
<p>You might want to get in touch with a developer regarding the issue<?php echo $plural ?>. If you feel adventurous, try enabling <code>WP_DEBUG</code> in your wp-config.php. </p>
</div>
</div>