This commit introduces a more reliable and consistent approach to setting up the development environment using backups: - Add setup-from-backup.sh script for environment setup from existing backups - Standardize script naming and organization - Move obsolete scripts to bin/obsolete directory - Update documentation with new workflow instructions - Create migration guide for transitioning to new workflow - Update Memory Bank with workflow improvements The new workflow provides: - More reliable environment setup - Faster setup process - Offline development capability - Consistent development environments across team members Breaking changes: - setup-dev.sh is replaced by setup-from-backup.sh - sync-and-setup.sh is replaced by separate scripts - verify-with-wpcli.sh is no longer used Migration path is documented in MIGRATION_GUIDE.md
66 lines
No EOL
2.6 KiB
PHP
66 lines
No EOL
2.6 KiB
PHP
<?php
|
|
$_wrapper_classes = [
|
|
$blockId,
|
|
$preset,
|
|
$arrows == 1 ? 'slick-arrows' : 'arrow-none',
|
|
$adaptiveHeight == 1 ? 'equal-height' : 'arrow-none',
|
|
$dotPreset
|
|
];
|
|
|
|
$_eb_classes = [
|
|
'eb-post-carousel',
|
|
'init-' . $blockId
|
|
];
|
|
|
|
$wrapper_attributes = get_block_wrapper_attributes(
|
|
[
|
|
'class' => 'root-' . $blockId,
|
|
]
|
|
);
|
|
?>
|
|
<div <?php echo wp_kses_data( $wrapper_attributes); ?>>
|
|
<div class="eb-parent-wrapper eb-parent-<?php echo esc_attr( $blockId ); ?> <?php echo esc_attr( $classHook ); ?>">
|
|
<div class="<?php echo esc_attr( implode( ' ', $_wrapper_classes ) ); ?> eb-post-carousel-wrapper"
|
|
data-id="<?php echo esc_attr( $blockId ); ?>"
|
|
data-querydata="<?php echo esc_attr( serialize( $queryData ) ); ?>"
|
|
data-slidersettings="<?php echo esc_attr( wp_json_encode( $sliderSettings ) ); ?>"
|
|
data-attributes="<?php echo esc_attr( wp_json_encode( $essentialAttr ) ); ?>">
|
|
|
|
<div class="<?php echo esc_attr( implode( ' ', $_eb_classes ) ); ?>"
|
|
data-id="<?php echo esc_attr( $blockId ); ?>">
|
|
<?php
|
|
/**
|
|
* Post Grid Markup
|
|
*/
|
|
|
|
if ( ! empty( $posts ) ) {
|
|
$_defined_vars = get_defined_vars();
|
|
$_params = isset( $_defined_vars['data'] ) ? $_defined_vars['data'] : [];
|
|
|
|
$_params = array_merge(
|
|
$_params,
|
|
[
|
|
'posts' => $posts,
|
|
'queryData' => isset( $queryData ) ? $queryData : [],
|
|
'source' => isset( $queryData['source'] ) ? $queryData['source'] : 'post',
|
|
'headerMeta' => ! empty( $headerMeta ) ? json_decode( $headerMeta ) : [],
|
|
'footerMeta' => ! empty( $footerMeta ) ? json_decode( $footerMeta ) : []
|
|
]
|
|
);
|
|
|
|
$helper::views( 'post-partials/carousel-markup', $_params );
|
|
}
|
|
|
|
/**
|
|
* No Post Markup
|
|
*/
|
|
if ( empty( $posts ) ) {
|
|
$helper::views( 'common/no-content', [
|
|
'content' => __( 'No Posts Found', 'essential-blocks' )
|
|
] );
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|