Astra_Builder::render_footer_dynamic_components( string $slug )
Render footer dynamic components.
Description
Parameters
- $slug
-
(string) (Required) slug.
Source
File: classes/class-astra-builder.php
public function render_footer_dynamic_components( $slug ) { if ( 0 === strpos( $slug, 'html' ) ) { ?> <div class="footer-widget-area widget-area site-footer-focus-item ast-footer-<?php echo esc_attr( $slug ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'button' ) ) { ?> <div class="ast-builder-layout-element site-footer-focus-item ast-footer-<?php echo esc_attr( $slug ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'widget' ) ) { ?> <aside <?php echo astra_attr( 'footer-widget-area-inner', array( 'class' => 'footer-widget-area widget-area site-footer-focus-item', 'data-section' => 'sidebar-widgets-footer-' . esc_attr( $slug ), ) ); ?> > <?php echo function_exists( 'astra_markup_open' ) ? astra_markup_open( 'footer-widget-div', array( 'echo' => false ) ) : '<div class="footer-widget-area-inner site-info-inner">'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped astra_get_sidebar( 'footer-' . str_replace( '_', '-', $slug ) ); echo function_exists( 'astra_markup_close' ) ? astra_markup_close( 'footer-widget-div', array( 'echo' => false ) ) : '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </aside> <?php } elseif ( 0 === strpos( $slug, 'social-icons' ) ) { $index = str_replace( 'social-icons-', '', $slug ); ?> <div class="ast-builder-layout-element site-footer-focus-item" data-section="section-fb-social-icons-<?php echo esc_attr( $index ); ?>"> <?php $action_name = 'astra_footer_social_' . $index; do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'divider' ) ) { $layout_class = astra_get_option( 'footer-' . $slug . '-layout' ); ?> <div class="footer-widget-area widget-area site-footer-focus-item ast-footer-divider-element ast-footer-<?php echo esc_attr( $slug ); ?> ast-fb-divider-layout-<?php echo esc_attr( $layout_class ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'language-switcher' ) ) { $layout_class = astra_get_option( 'footer-' . $slug . '-layout' ); ?> <div class="ast-builder-layout-element site-footer-focus-item ast-footer-language-switcher-element ast-footer-<?php echo esc_attr( $slug ); ?> ast-fb-language-switcher-layout-<?php echo esc_attr( $layout_class ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } }
Expand full source code Collapse full source code View on Trac