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,37 @@
<?php
if ( ! function_exists( 'calla_elated_footer_top_general_styles' ) ) {
/**
* Generates general custom styles for footer top area
*/
function calla_elated_footer_top_general_styles() {
$item_styles = array();
$background_color = calla_elated_options()->getOptionValue( 'footer_top_background_color' );
if ( ! empty( $background_color ) ) {
$item_styles['background-color'] = $background_color;
}
echo calla_elated_dynamic_css( '.eltdf-page-footer .eltdf-footer-top-holder', $item_styles );
}
add_action( 'calla_elated_style_dynamic', 'calla_elated_footer_top_general_styles' );
}
if ( ! function_exists( 'calla_elated_footer_bottom_general_styles' ) ) {
/**
* Generates general custom styles for footer bottom area
*/
function calla_elated_footer_bottom_general_styles() {
$item_styles = array();
$background_color = calla_elated_options()->getOptionValue( 'footer_bottom_background_color' );
if ( ! empty( $background_color ) ) {
$item_styles['background-color'] = $background_color;
}
echo calla_elated_dynamic_css( '.eltdf-page-footer .eltdf-footer-bottom-holder', $item_styles );
}
add_action( 'calla_elated_style_dynamic', 'calla_elated_footer_bottom_general_styles' );
}

View File

@@ -0,0 +1,82 @@
<?php
if ( ! function_exists( 'calla_elated_map_footer_meta' ) ) {
function calla_elated_map_footer_meta() {
$footer_meta_box = calla_elated_create_meta_box(
array(
'scope' => apply_filters( 'calla_elated_set_scope_for_meta_boxes', array( 'page', 'post' ), 'footer_meta' ),
'title' => esc_html__( 'Footer', 'calla' ),
'name' => 'footer_meta'
)
);
calla_elated_create_meta_box_field(
array(
'name' => 'eltdf_disable_footer_meta',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Disable Footer for this Page', 'calla' ),
'description' => esc_html__( 'Enabling this option will hide footer on this page', 'calla' ),
'options' => calla_elated_get_yes_no_select_array(),
'parent' => $footer_meta_box
)
);
$show_footer_meta_container = calla_elated_add_admin_container(
array(
'name' => 'eltdf_show_footer_meta_container',
'parent' => $footer_meta_box,
'dependency' => array(
'hide' => array(
'eltdf_disable_footer_meta' => 'yes'
)
)
)
);
calla_elated_create_meta_box_field(
array(
'name' => 'eltdf_show_footer_top_meta',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Show Footer Top', 'calla' ),
'description' => esc_html__( 'Enabling this option will show Footer Top area', 'calla' ),
'options' => calla_elated_get_yes_no_select_array(),
'parent' => $show_footer_meta_container
)
);
calla_elated_create_meta_box_field(
array(
'name' => 'eltdf_show_footer_bottom_meta',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Show Footer Bottom', 'calla' ),
'description' => esc_html__( 'Enabling this option will show Footer Bottom area', 'calla' ),
'options' => calla_elated_get_yes_no_select_array(),
'parent' => $show_footer_meta_container
)
);
calla_elated_create_meta_box_field(
array(
'name' => 'eltdf_footer_in_grid_meta',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Footer in Grid', 'calla' ),
'description' => esc_html__( 'Enabling this option will place Footer content in grid', 'calla' ),
'options' => calla_elated_get_yes_no_select_array(),
'dependency' => array(
'hide' => array(
'eltdf_show_footer_top_meta' => array('', 'no'),
'eltdf_show_footer_bottom_meta' => array('', 'no')
)
),
'parent' => $show_footer_meta_container
)
);
}
add_action( 'calla_elated_meta_boxes_map', 'calla_elated_map_footer_meta', 70 );
}

View File

@@ -0,0 +1,151 @@
<?php
if ( ! function_exists( 'calla_elated_footer_options_map' ) ) {
function calla_elated_footer_options_map() {
calla_elated_add_admin_page(
array(
'slug' => '_footer_page',
'title' => esc_html__( 'Footer', 'calla' ),
'icon' => 'fa fa-sort-amount-asc'
)
);
$footer_panel = calla_elated_add_admin_panel(
array(
'title' => esc_html__( 'Footer', 'calla' ),
'name' => 'footer',
'page' => '_footer_page'
)
);
calla_elated_add_admin_field(
array(
'type' => 'yesno',
'name' => 'footer_in_grid',
'default_value' => 'yes',
'label' => esc_html__( 'Footer in Grid', 'calla' ),
'description' => esc_html__( 'Enabling this option will place Footer content in grid', 'calla' ),
'parent' => $footer_panel
)
);
calla_elated_add_admin_field(
array(
'type' => 'yesno',
'name' => 'show_footer_top',
'default_value' => 'yes',
'label' => esc_html__( 'Show Footer Top', 'calla' ),
'description' => esc_html__( 'Enabling this option will show Footer Top area', 'calla' ),
'parent' => $footer_panel,
)
);
$show_footer_top_container = calla_elated_add_admin_container(
array(
'name' => 'show_footer_top_container',
'parent' => $footer_panel,
'dependency' => array(
'show' => array(
'show_footer_top' => 'yes'
)
)
)
);
calla_elated_add_admin_field(
array(
'type' => 'select',
'name' => 'footer_top_columns',
'parent' => $show_footer_top_container,
'default_value' => '4',
'label' => esc_html__( 'Footer Top Columns', 'calla' ),
'description' => esc_html__( 'Choose number of columns for Footer Top area', 'calla' ),
'options' => array(
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4'
)
)
);
calla_elated_add_admin_field(
array(
'type' => 'select',
'name' => 'footer_top_columns_alignment',
'default_value' => 'left',
'label' => esc_html__( 'Footer Top Columns Alignment', 'calla' ),
'description' => esc_html__( 'Text Alignment in Footer Columns', 'calla' ),
'options' => array(
'' => esc_html__( 'Default', 'calla' ),
'left' => esc_html__( 'Left', 'calla' ),
'center' => esc_html__( 'Center', 'calla' ),
'right' => esc_html__( 'Right', 'calla' )
),
'parent' => $show_footer_top_container,
)
);
calla_elated_add_admin_field(
array(
'name' => 'footer_top_background_color',
'type' => 'color',
'label' => esc_html__( 'Background Color', 'calla' ),
'description' => esc_html__( 'Set background color for top footer area', 'calla' ),
'parent' => $show_footer_top_container
)
);
calla_elated_add_admin_field(
array(
'type' => 'yesno',
'name' => 'show_footer_bottom',
'default_value' => 'yes',
'label' => esc_html__( 'Show Footer Bottom', 'calla' ),
'description' => esc_html__( 'Enabling this option will show Footer Bottom area', 'calla' ),
'parent' => $footer_panel,
)
);
$show_footer_bottom_container = calla_elated_add_admin_container(
array(
'name' => 'show_footer_bottom_container',
'parent' => $footer_panel,
'dependency' => array(
'show' => array(
'show_footer_bottom' => 'yes'
)
)
)
);
calla_elated_add_admin_field(
array(
'type' => 'select',
'name' => 'footer_bottom_columns',
'default_value' => '2',
'label' => esc_html__( 'Footer Bottom Columns', 'calla' ),
'description' => esc_html__( 'Choose number of columns for Footer Bottom area', 'calla' ),
'options' => array(
'1' => '1',
'2' => '2',
'3' => '3'
),
'parent' => $show_footer_bottom_container,
)
);
calla_elated_add_admin_field(
array(
'name' => 'footer_bottom_background_color',
'type' => 'color',
'label' => esc_html__( 'Background Color', 'calla' ),
'description' => esc_html__( 'Set background color for bottom footer area', 'calla' ),
'parent' => $show_footer_bottom_container
)
);
}
add_action( 'calla_elated_options_map', 'calla_elated_footer_options_map', 9 );
}

View File

@@ -0,0 +1,41 @@
/* ==========================================================================
Footer responsive styles - begin
========================================================================== */
/* common mixins - start */
/* common mixins - end */
/* mixins styles - start */
/* mixins styles - end */
/* ==========================================================================
Footer responsive style - begin
========================================================================== */
@media only screen and (max-width: 1024px) and (min-width: 681px) {
.eltdf-page-footer .eltdf-column-content.eltdf-grid-col-3 {
width: 50%;
float: left;
}
.eltdf-page-footer .eltdf-column-content.eltdf-grid-col-3:nth-child(2n+1) {
clear: both;
}
.eltdf-page-footer .eltdf-column-content.eltdf-grid-col-3:nth-child(3), .eltdf-page-footer .eltdf-column-content.eltdf-grid-col-3:nth-child(4) {
margin-top: 30px;
}
.eltdf-page-footer .eltdf-column-content.eltdf-grid-col-4 {
width: 33.33333333333333%;
float: left;
}
}
@media only screen and (max-width: 680px) {
.eltdf-page-footer .eltdf-column-content:not(:first-child) {
margin-top: 30px;
}
}
/* ==========================================================================
Footer responsive style - end
========================================================================== */
/* ==========================================================================
Footer responsive styles - end
========================================================================== */
/*# sourceMappingURL=footer-map-responsive.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"file":"footer-map-responsive.css","sources":["footer/assets/css/scss/footer-map-responsive.scss","../../assets/css/scss/_variables.scss","../../assets/css/scss/_mixins.scss","footer/assets/css/scss/responsive/_footer-responsive.scss"],"names":[],"mappings":"AAAA;;gFAEgF;AEkKhF,2BAA2B;AAqL3B,yBAAyB;AAEzB,2BAA2B;AA+B3B,yBAAyB;AC1XzB;;gFAEgF;AAQ7E,MAAM,MAAC,MAAkC,MD6YnB,SAAS,EAAE,MAAM,OC7Yf,SAAS,EAAE,KAAK;EAJ1C,AAMG,kBANe,CAEjB,qBAAqB,AAIlB,iBAAiB,CAAC;IAClB,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,IAAI;GAUX;EAlBJ,AAUI,kBAVc,CAEjB,qBAAqB,AAIlB,iBAAiB,AAIhB,UAAW,CAAA,IAAI,EAAE;IACjB,KAAK,EAAE,IAAI;GACX;EAZL,AAcI,kBAdc,CAEjB,qBAAqB,AAIlB,iBAAiB,AAQhB,UAAW,CAAA,CAAC,GAdjB,kBAAkB,CAEjB,qBAAqB,AAIlB,iBAAiB,AAShB,UAAW,CAAA,CAAC,EAAE;IACd,UAAU,EAAE,IAAI;GAChB;EAjBL,AAoBG,kBApBe,CAEjB,qBAAqB,AAkBlB,iBAAiB,CAAC;IAClB,KAAK,EAAE,kBAAkB;IACzB,KAAK,EAAE,IAAI;GACX;;;ADsYJ,MAAM,MAAM,MAAM,MAAM,SAAS,EAAE,KAAK;EC9XxC,AAIE,kBAJgB,CAEjB,qBAAqB,AAEnB,IAAK,CAAA,YAAY,EAAE;IACnB,UAAU,EAAE,IAAI;GAChB;;;AAIJ;;gFAEgF;AHzChF;;gFAEgF","sourceRoot":"../../../../../css"}

View File

@@ -0,0 +1,94 @@
/* ==========================================================================
Footer styles - begin
========================================================================== */
/* common mixins - start */
/* common mixins - end */
/* mixins styles - start */
/* mixins styles - end */
/* ==========================================================================
Footer style - begin
========================================================================== */
.eltdf-page-footer {
position: relative;
display: inline-block;
width: 100%;
vertical-align: middle;
z-index: 100;
box-sizing: border-box;
}
.eltdf-page-footer .widget .textwidget {
color: #909090;
}
.eltdf-page-footer .widget .eltdf-widget-title-holder {
margin-top: 7px;
}
.eltdf-page-footer .eltdf-footer-top-holder {
position: relative;
display: inline-block;
width: 100%;
vertical-align: middle;
background-color: #2c2c2c;
box-sizing: border-box;
}
.eltdf-page-footer .eltdf-footer-top-holder .eltdf-footer-top-alignment-center {
text-align: center;
}
.eltdf-page-footer .eltdf-footer-top-holder .eltdf-footer-top-alignment-left {
text-align: left;
}
.eltdf-page-footer .eltdf-footer-top-holder .eltdf-footer-top-alignment-right {
text-align: right;
}
.eltdf-page-footer .eltdf-footer-top-holder .eltdf-footer-top-inner {
box-sizing: border-box;
}
.eltdf-page-footer .eltdf-footer-top-holder .eltdf-footer-top-inner.eltdf-grid {
padding: 110px 0 91px;
}
.eltdf-page-footer .eltdf-footer-top-holder .eltdf-footer-top-inner.eltdf-full-width {
padding: 110px 12% 91px;
}
.eltdf-page-footer .eltdf-footer-bottom-holder {
position: relative;
display: inline-block;
width: 100%;
vertical-align: middle;
background-color: #202020;
box-sizing: border-box;
text-align: center;
}
.eltdf-page-footer .eltdf-footer-bottom-holder .eltdf-footer-bottom-inner {
box-sizing: border-box;
}
.eltdf-page-footer .eltdf-footer-bottom-holder .eltdf-footer-bottom-inner .widget {
margin: 0;
}
.eltdf-page-footer .eltdf-footer-bottom-holder .eltdf-footer-bottom-inner.eltdf-grid {
padding: 12px 0;
}
.eltdf-page-footer .eltdf-footer-bottom-holder .eltdf-footer-bottom-inner.eltdf-full-width {
padding: 12px 40px;
}
/* ==========================================================================
Footer style - end
========================================================================== */
/* ==========================================================================
Footer styles - end
========================================================================== */
/*# sourceMappingURL=footer-map.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"file":"footer-map.css","sources":["footer/assets/css/scss/footer-map.scss","../../assets/css/scss/_variables.scss","../../assets/css/scss/_mixins.scss","footer/assets/css/scss/default/_footer.scss"],"names":[],"mappings":"AAAA;;gFAEgF;AEkKhF,2BAA2B;AAqL3B,yBAAyB;AAEzB,2BAA2B;AA+B3B,yBAAyB;AC1XzB;;gFAEgF;AAEhF,AAAA,kBAAkB,CAAC;EDelB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,MAAM;EChBnB,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,UAAU;CA2DzB;;AA9DD,AAKQ,kBALU,CAId,OAAO,CACH,WAAW,CAAA;EACP,KAAK,EAAE,OAAO;CACjB;;AAPT,AAQQ,kBARU,CAId,OAAO,CAIH,0BAA0B,CAAA;EACtB,UAAU,EAAE,GAAG;CAClB;;AAVT,AAYI,kBAZc,CAYd,wBAAwB,CAAC;EDG5B,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,MAAM;ECJf,gBAAgB,EAAE,OAAO;EACzB,UAAU,EAAE,UAAU;CAyBzB;;AAxCL,AAiBQ,kBAjBU,CAYd,wBAAwB,CAKpB,kCAAkC,CAAA;EAC9B,UAAU,EAAE,MAAM;CACrB;;AAnBT,AAqBQ,kBArBU,CAYd,wBAAwB,CASpB,gCAAgC,CAAA;EAC5B,UAAU,EAAE,IAAI;CACnB;;AAvBT,AAyBQ,kBAzBU,CAYd,wBAAwB,CAapB,iCAAiC,CAAA;EAC7B,UAAU,EAAE,KAAK;CACpB;;AA3BT,AA6BQ,kBA7BU,CAYd,wBAAwB,CAiBpB,uBAAuB,CAAA;EACnB,UAAU,EAAE,UAAU;CASzB;;AAvCT,AAgCY,kBAhCM,CAYd,wBAAwB,CAiBpB,uBAAuB,AAGlB,WAAW,CAAA;EACR,OAAO,EAAE,YAAY;CACxB;;AAlCb,AAoCY,kBApCM,CAYd,wBAAwB,CAiBpB,uBAAuB,AAOlB,iBAAiB,CAAA;EACd,OAAO,EAAE,cAAc;CAC1B;;AAtCb,AA0CI,kBA1Cc,CA0Cd,2BAA2B,CAAC;ED3B/B,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,MAAM;EC0Bf,gBAAgB,EAAE,OAAO;EACzB,UAAU,EAAE,UAAU;EACtB,UAAU,EAAE,MAAM;CAerB;;AA7DL,AAgDQ,kBAhDU,CA0Cd,2BAA2B,CAMvB,0BAA0B,CAAC;EACvB,UAAU,EAAE,UAAU;CAWzB;;AA5DT,AAkDS,kBAlDS,CA0Cd,2BAA2B,CAMvB,0BAA0B,CAEzB,OAAO,CAAA;EACA,MAAM,EAAE,CAAC;CACZ;;AApDb,AAqDY,kBArDM,CA0Cd,2BAA2B,CAMvB,0BAA0B,AAKrB,WAAW,CAAC;EACT,OAAO,EAAE,MAAM;CAClB;;AAvDb,AAyDY,kBAzDM,CA0Cd,2BAA2B,CAMvB,0BAA0B,AASrB,iBAAiB,CAAC;EACf,OAAO,EAAE,SAAS;CACrB;;AAIb;;gFAEgF;AH7DhF;;gFAEgF","sourceRoot":"../../../../../css"}

View File

@@ -0,0 +1,231 @@
<?php
if ( ! function_exists( 'calla_elated_register_footer_sidebar' ) ) {
function calla_elated_register_footer_sidebar() {
$show_footer_top = calla_elated_options()->getOptionValue( 'show_footer_top' ) !== 'yes' ? false : true;
$show_footer_bottom = calla_elated_options()->getOptionValue( 'show_footer_bottom' ) !== 'yes' ? false : true;
if ( $show_footer_top ) {
register_sidebar(
array(
'id' => 'footer_top_column_1',
'name' => esc_html__( 'Footer Top Column 1', 'calla' ),
'description' => esc_html__( 'Widgets added here will appear in the first column of top footer area', 'calla' ),
'before_widget' => '<div id="%1$s" class="widget eltdf-footer-column-1 %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="eltdf-widget-title-holder"><h5 class="eltdf-widget-title">',
'after_title' => '</h5></div>'
)
);
register_sidebar(
array(
'id' => 'footer_top_column_2',
'name' => esc_html__( 'Footer Top Column 2', 'calla' ),
'description' => esc_html__( 'Widgets added here will appear in the second column of top footer area', 'calla' ),
'before_widget' => '<div id="%1$s" class="widget eltdf-footer-column-2 %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="eltdf-widget-title-holder"><h5 class="eltdf-widget-title">',
'after_title' => '</h5></div>'
)
);
register_sidebar(
array(
'id' => 'footer_top_column_3',
'name' => esc_html__( 'Footer Top Column 3', 'calla' ),
'description' => esc_html__( 'Widgets added here will appear in the third column of top footer area', 'calla' ),
'before_widget' => '<div id="%1$s" class="widget eltdf-footer-column-3 %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="eltdf-widget-title-holder"><h5 class="eltdf-widget-title">',
'after_title' => '</h5></div>'
)
);
register_sidebar(
array(
'id' => 'footer_top_column_4',
'name' => esc_html__( 'Footer Top Column 4', 'calla' ),
'description' => esc_html__( 'Widgets added here will appear in the fourth column of top footer area', 'calla' ),
'before_widget' => '<div id="%1$s" class="widget eltdf-footer-column-4 %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="eltdf-widget-title-holder"><h5 class="eltdf-widget-title">',
'after_title' => '</h5></div>'
)
);
}
if ( $show_footer_bottom ) {
register_sidebar(
array(
'id' => 'footer_bottom_column_1',
'name' => esc_html__( 'Footer Bottom Column 1', 'calla' ),
'description' => esc_html__( 'Widgets added here will appear in the first column of bottom footer area', 'calla' ),
'before_widget' => '<div id="%1$s" class="widget eltdf-footer-bottom-column-1 %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="eltdf-widget-title-holder"><h5 class="eltdf-widget-title">',
'after_title' => '</h5></div>'
)
);
register_sidebar(
array(
'id' => 'footer_bottom_column_2',
'name' => esc_html__( 'Footer Bottom Column 2', 'calla' ),
'description' => esc_html__( 'Widgets added here will appear in the second column of bottom footer area', 'calla' ),
'before_widget' => '<div id="%1$s" class="widget eltdf-footer-bottom-column-2 %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="eltdf-widget-title-holder"><h5 class="eltdf-widget-title">',
'after_title' => '</h5></div>'
)
);
register_sidebar(
array(
'id' => 'footer_bottom_column_3',
'name' => esc_html__( 'Footer Bottom Column 3', 'calla' ),
'description' => esc_html__( 'Widgets added here will appear in the third column of bottom footer area', 'calla' ),
'before_widget' => '<div id="%1$s" class="widget eltdf-footer-bottom-column-3 %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="eltdf-widget-title-holder"><h5 class="eltdf-widget-title">',
'after_title' => '</h5></div>'
)
);
}
}
add_action( 'widgets_init', 'calla_elated_register_footer_sidebar' );
}
if ( ! function_exists( 'calla_elated_get_footer' ) ) {
/**
* Loads footer HTML
*/
function calla_elated_get_footer() {
$parameters = array();
$page_id = calla_elated_get_page_id();
$disable_footer_meta = get_post_meta( $page_id, 'eltdf_disable_footer_meta', true );
$parameters['display_footer'] = $disable_footer_meta === 'yes' ? false : true;
$parameters['display_footer_top'] = calla_elated_show_footer_top();
$parameters['display_footer_bottom'] = calla_elated_show_footer_bottom();
calla_elated_get_module_template_part( 'templates/footer', 'footer', '', $parameters );
}
add_action( 'calla_elated_get_footer_template', 'calla_elated_get_footer' );
}
if ( ! function_exists( 'calla_elated_show_footer_top' ) ) {
/**
* Check footer top showing
* Function check value from options and checks if footer columns are empty.
* return bool
*/
function calla_elated_show_footer_top() {
$footer_top_flag = false;
//check value from options and meta field on current page
$option_flag = ( calla_elated_get_meta_field_intersect( 'show_footer_top' ) === 'yes' ) ? true : false;
//check footer columns.If they are empty, disable footer top
$columns_flag = false;
for ( $i = 1; $i <= 4; $i ++ ) {
$footer_columns_id = 'footer_top_column_' . $i;
if ( is_active_sidebar( $footer_columns_id ) ) {
$columns_flag = true;
break;
}
}
if ( $option_flag && $columns_flag ) {
$footer_top_flag = true;
}
return $footer_top_flag;
}
}
if ( ! function_exists( 'calla_elated_show_footer_bottom' ) ) {
/**
* Check footer bottom showing
* Function check value from options and checks if footer columns are empty.
* return bool
*/
function calla_elated_show_footer_bottom() {
$footer_bottom_flag = false;
//check value from options and meta field on current page
$option_flag = ( calla_elated_get_meta_field_intersect( 'show_footer_bottom' ) === 'yes' ) ? true : false;
//check footer columns.If they are empty, disable footer bottom
$columns_flag = false;
for ( $i = 1; $i <= 3; $i ++ ) {
$footer_columns_id = 'footer_bottom_column_' . $i;
if ( is_active_sidebar( $footer_columns_id ) ) {
$columns_flag = true;
break;
}
}
if ( $option_flag && $columns_flag ) {
$footer_bottom_flag = true;
}
return $footer_bottom_flag;
}
}
if ( ! function_exists( 'calla_elated_get_footer_top' ) ) {
/**
* Return footer top HTML
*/
function calla_elated_get_footer_top() {
$parameters = array();
//get number of top footer columns
$parameters['footer_top_columns'] = calla_elated_options()->getOptionValue( 'footer_top_columns' );
//get footer top grid/full width class
$parameters['footer_top_grid_class'] = calla_elated_get_meta_field_intersect( 'footer_in_grid' ) === 'yes' ? 'eltdf-grid' : 'eltdf-full-width';
//get footer top other classes
$footer_top_classes = array();
//footer alignment
$footer_top_alignment = calla_elated_options()->getOptionValue( 'footer_top_columns_alignment' );
$footer_top_classes[] = ! empty( $footer_top_alignment ) ? 'eltdf-footer-top-alignment-' . esc_attr( $footer_top_alignment ) : '';
$footer_top_classes = apply_filters( 'calla_elated_footer_top_classes', $footer_top_classes );
$parameters['footer_top_classes'] = implode( ' ', $footer_top_classes );
calla_elated_get_module_template_part( 'templates/parts/footer-top', 'footer', '', $parameters );
}
}
if ( ! function_exists( 'calla_elated_get_footer_bottom' ) ) {
/**
* Return footer bottom HTML
*/
function calla_elated_get_footer_bottom() {
$parameters = array();
//get number of bottom footer columns
$parameters['footer_bottom_columns'] = calla_elated_options()->getOptionValue( 'footer_bottom_columns' );
//get footer top grid/full width class
$parameters['footer_bottom_grid_class'] = calla_elated_get_meta_field_intersect( 'footer_in_grid' ) === 'yes' ? 'eltdf-grid' : 'eltdf-full-width';
//get footer top other classes
$footer_bottom_classes = array();
$footer_bottom_classes = apply_filters( 'calla_elated_footer_bottom_classes', $footer_bottom_classes );
$parameters['footer_bottom_classes'] = implode( ' ', $footer_bottom_classes );
calla_elated_get_module_template_part( 'templates/parts/footer-bottom', 'footer', '', $parameters );
}
}

View File

@@ -0,0 +1,12 @@
<?php
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/footer/functions.php';
//load global footer options
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/footer/admin/options-map/footer-map.php';
//load per page footer options
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/footer/admin/meta-boxes/footer-meta-boxes.php';
//load global footer custom styles
include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/footer/admin/custom-styles/footer-custom-styles.php';

View File

@@ -0,0 +1,20 @@
<?php do_action( 'calla_elated_before_footer_content' ); ?>
</div> <!-- close div.content_inner -->
</div> <!-- close div.content -->
<?php if($display_footer && ($display_footer_top || $display_footer_bottom)) { ?>
<footer class="eltdf-page-footer">
<?php
if($display_footer_top) {
calla_elated_get_footer_top();
}
if($display_footer_bottom) {
calla_elated_get_footer_bottom();
}
?>
</footer>
<?php } ?>
</div> <!-- close div.eltdf-wrapper-inner -->
</div> <!-- close div.eltdf-wrapper -->
<?php wp_footer(); ?>
</body>
</html>

View File

@@ -0,0 +1,15 @@
<div class="eltdf-footer-bottom-holder">
<div class="eltdf-footer-bottom-inner <?php echo esc_attr($footer_bottom_grid_class); ?>">
<div class="eltdf-grid-row <?php echo esc_attr($footer_bottom_classes); ?>">
<?php for($i = 1; $i <= $footer_bottom_columns; $i++) { ?>
<div class="eltdf-grid-col-<?php echo esc_attr(12 / $footer_bottom_columns); ?>">
<?php
if(is_active_sidebar('footer_bottom_column_'.$i)) {
dynamic_sidebar('footer_bottom_column_'.$i);
}
?>
</div>
<?php } ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="eltdf-footer-top-holder">
<div class="eltdf-footer-top-inner <?php echo esc_attr($footer_top_grid_class); ?>">
<div class="eltdf-grid-row <?php echo esc_attr($footer_top_classes); ?>">
<?php for($i = 1; $i <= $footer_top_columns; $i++) { ?>
<div class="eltdf-column-content eltdf-grid-col-<?php echo esc_attr(12 / $footer_top_columns); ?>">
<?php
if(is_active_sidebar('footer_top_column_'.$i)) {
dynamic_sidebar('footer_top_column_'.$i);
}
?>
</div>
<?php } ?>
</div>
</div>
</div>