first commit

This commit is contained in:
2023-11-23 22:14:40 +01:00
commit 6c5e83d1b2
2779 changed files with 640726 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
<?php
if ( ! function_exists( 'calla_elated_map_content_bottom_meta' ) ) {
function calla_elated_map_content_bottom_meta() {
$content_bottom_meta_box = calla_elated_create_meta_box(
array(
'scope' => apply_filters( 'calla_elated_set_scope_for_meta_boxes', array( 'page', 'post' ), 'content_bottom_meta' ),
'title' => esc_html__( 'Content Bottom', 'calla' ),
'name' => 'content_bottom_meta'
)
);
calla_elated_create_meta_box_field(
array(
'name' => 'eltdf_enable_content_bottom_area_meta',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Enable Content Bottom Area', 'calla' ),
'description' => esc_html__( 'This option will enable Content Bottom area on pages', 'calla' ),
'parent' => $content_bottom_meta_box,
'options' => calla_elated_get_yes_no_select_array()
)
);
$show_content_bottom_meta_container = calla_elated_add_admin_container(
array(
'parent' => $content_bottom_meta_box,
'name' => 'eltdf_show_content_bottom_meta_container',
'dependency' => array(
'show' => array(
'eltdf_enable_content_bottom_area_meta' => 'yes'
)
)
)
);
calla_elated_create_meta_box_field(
array(
'name' => 'eltdf_content_bottom_sidebar_custom_display_meta',
'type' => 'selectblank',
'default_value' => '',
'label' => esc_html__( 'Sidebar to Display', 'calla' ),
'description' => esc_html__( 'Choose a content bottom sidebar to display', 'calla' ),
'options' => calla_elated_get_custom_sidebars(),
'parent' => $show_content_bottom_meta_container,
'args' => array(
'select2' => true
)
)
);
calla_elated_create_meta_box_field(
array(
'type' => 'select',
'name' => 'eltdf_content_bottom_in_grid_meta',
'default_value' => '',
'label' => esc_html__( 'Display in Grid', 'calla' ),
'description' => esc_html__( 'Enabling this option will place content bottom in grid', 'calla' ),
'options' => calla_elated_get_yes_no_select_array(),
'parent' => $show_content_bottom_meta_container
)
);
calla_elated_create_meta_box_field(
array(
'type' => 'color',
'name' => 'eltdf_content_bottom_background_color_meta',
'label' => esc_html__( 'Background Color', 'calla' ),
'description' => esc_html__( 'Choose a background color for content bottom area', 'calla' ),
'parent' => $show_content_bottom_meta_container
)
);
}
add_action( 'calla_elated_meta_boxes_map', 'calla_elated_map_content_bottom_meta', 71 );
}

View File

@@ -0,0 +1,74 @@
<?php
if ( ! function_exists( 'calla_elated_content_bottom_options_map' ) ) {
function calla_elated_content_bottom_options_map() {
$panel_content_bottom = calla_elated_add_admin_panel(
array(
'page' => '_page_page',
'name' => 'panel_content_bottom',
'title' => esc_html__( 'Content Bottom Area Style', 'calla' )
)
);
calla_elated_add_admin_field(
array(
'name' => 'enable_content_bottom_area',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Enable Content Bottom Area', 'calla' ),
'description' => esc_html__( 'This option will enable Content Bottom area on pages', 'calla' ),
'parent' => $panel_content_bottom
)
);
$enable_content_bottom_area_container = calla_elated_add_admin_container(
array(
'parent' => $panel_content_bottom,
'name' => 'enable_content_bottom_area_container',
'dependency' => array(
'show' => array(
'enable_content_bottom_area' => 'yes'
)
)
)
);
$calla_custom_sidebars = calla_elated_get_custom_sidebars();
calla_elated_add_admin_field(
array(
'type' => 'selectblank',
'name' => 'content_bottom_sidebar_custom_display',
'default_value' => '',
'label' => esc_html__( 'Widget Area to Display', 'calla' ),
'description' => esc_html__( 'Choose a Content Bottom widget area to display', 'calla' ),
'options' => $calla_custom_sidebars,
'parent' => $enable_content_bottom_area_container
)
);
calla_elated_add_admin_field(
array(
'type' => 'yesno',
'name' => 'content_bottom_in_grid',
'default_value' => 'yes',
'label' => esc_html__( 'Display in Grid', 'calla' ),
'description' => esc_html__( 'Enabling this option will place Content Bottom in grid', 'calla' ),
'parent' => $enable_content_bottom_area_container
)
);
calla_elated_add_admin_field(
array(
'type' => 'color',
'name' => 'content_bottom_background_color',
'label' => esc_html__( 'Background Color', 'calla' ),
'description' => esc_html__( 'Choose a background color for Content Bottom area', 'calla' ),
'parent' => $enable_content_bottom_area_container
)
);
}
add_action( 'calla_elated_additional_page_options_map', 'calla_elated_content_bottom_options_map' );
}

View File

@@ -0,0 +1,30 @@
/* ==========================================================================
Content Bottom styles - begin
========================================================================== */
/* common mixins - start */
/* common mixins - end */
/* mixins styles - start */
/* mixins styles - end */
/* ==========================================================================
#Content bottom styles - begin
========================================================================== */
.eltdf-content-bottom .eltdf-content-bottom-inner {
box-sizing: border-box;
}
.eltdf-content-bottom .eltdf-content-bottom-inner.eltdf-grid {
padding: 20px 0;
}
.eltdf-content-bottom .eltdf-content-bottom-inner.eltdf-full-width {
padding: 20px 40px;
}
/* ==========================================================================
#Content bottom styles - end
========================================================================== */
/* ==========================================================================
Content Bottom styles - end
========================================================================== */
/*# sourceMappingURL=content-bottom-map.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"file":"content-bottom-map.css","sources":["content-bottom/assets/css/scss/content-bottom-map.scss","../../assets/css/scss/_variables.scss","../../assets/css/scss/_mixins.scss","content-bottom/assets/css/scss/default/_content-bottom.scss"],"names":[],"mappings":"AAAA;;gFAEgF;AEkKhF,2BAA2B;AAqL3B,yBAAyB;AAEzB,2BAA2B;AA+B3B,yBAAyB;AC1XzB;;gFAEgF;AAEhF,AAEC,qBAFoB,CAEpB,2BAA2B,CAAC;EAC3B,UAAU,EAAE,UAAU;CAStB;;AAZF,AAKE,qBALmB,CAEpB,2BAA2B,AAGzB,WAAW,CAAC;EACZ,OAAO,EAAE,MAAM;CACf;;AAPH,AASE,qBATmB,CAEpB,2BAA2B,AAOzB,iBAAiB,CAAC;EAClB,OAAO,EAAE,SAAS;CAClB;;AAIH;;gFAEgF;AHbhF;;gFAEgF","sourceRoot":"../../../../../css"}

View File

@@ -0,0 +1,38 @@
<?php
if ( ! function_exists( 'calla_elated_get_content_bottom_area' ) ) {
/**
* Loads content bottom area HTML with all needed parameters
*/
function calla_elated_get_content_bottom_area() {
$parameters = array();
//Current page id
$id = calla_elated_get_page_id();
//is content bottom area enabled for current page?
$parameters['content_bottom_area'] = calla_elated_get_meta_field_intersect( 'enable_content_bottom_area', $id );
if ( $parameters['content_bottom_area'] === 'yes' ) {
//Sidebar for content bottom area
$parameters['content_bottom_area_sidebar'] = calla_elated_get_meta_field_intersect( 'content_bottom_sidebar_custom_display', $id );
//Content bottom area in grid
$parameters['grid_class'] = ( calla_elated_get_meta_field_intersect( 'content_bottom_in_grid', $id ) ) === 'yes' ? 'eltdf-grid' : 'eltdf-full-width';
$parameters['content_bottom_style'] = array();
//Content bottom area background color
$background_color = calla_elated_get_meta_field_intersect( 'content_bottom_background_color', $id );
if ( $background_color !== '' ) {
$parameters['content_bottom_style'][] = 'background-color: ' . $background_color . ';';
}
if ( is_active_sidebar( $parameters['content_bottom_area_sidebar'] ) ) {
calla_elated_get_module_template_part( 'templates/content-bottom-area', 'content-bottom', '', $parameters );
}
}
}
add_action( 'calla_elated_before_footer_content', 'calla_elated_get_content_bottom_area' );
}

View File

@@ -0,0 +1,9 @@
<?php
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/content-bottom/functions.php';
//load global content bottom options
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/content-bottom/admin/options-map/content-bottom-map.php';
//load per page content bottom options
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/content-bottom/admin/meta-boxes/content-bottom-meta-boxes.php';

View File

@@ -0,0 +1,5 @@
<div class="eltdf-content-bottom" <?php calla_elated_inline_style( $content_bottom_style ); ?>>
<div class="eltdf-content-bottom-inner <?php echo esc_attr( $grid_class ); ?>">
<?php dynamic_sidebar( $content_bottom_area_sidebar ); ?>
</div>
</div>