Astra_Builder_Header::__construct()
Constructor
Description
Source
File: inc/builder/markup/class-astra-builder-header.php
public function __construct() { if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { $this->remove_existing_actions(); add_action( 'body_class', array( $this, 'add_body_class' ) ); // Header Desktop Builder. add_action( 'astra_masthead', array( $this, 'desktop_header' ) ); add_action( 'astra_above_header', array( $this, 'above_header' ) ); add_action( 'astra_primary_header', array( $this, 'primary_header' ) ); add_action( 'astra_below_header', array( $this, 'below_header' ) ); add_action( 'astra_render_header_column', array( $this, 'render_column' ), 10, 2 ); // Mobile Builder. add_action( 'astra_mobile_header', array( $this, 'mobile_header' ) ); add_action( 'astra_mobile_above_header', array( $this, 'mobile_above_header' ) ); add_action( 'astra_mobile_primary_header', array( $this, 'mobile_primary_header' ) ); add_action( 'astra_mobile_below_header', array( $this, 'mobile_below_header' ) ); add_action( 'astra_render_mobile_header_column', array( $this, 'render_mobile_column' ), 10, 2 ); // Load Off-Canvas Markup on Footer. add_action( 'astra_footer', array( $this, 'mobile_popup' ) ); add_action( 'astra_mobile_header_content', array( $this, 'render_mobile_column' ), 10, 2 ); add_action( 'astra_render_mobile_popup', array( $this, 'render_mobile_column' ), 10, 2 ); for ( $index = 1; $index <= Astra_Builder_Helper::$component_limit; $index++ ) { // Buttons. add_action( 'astra_header_button_' . $index, array( $this, 'button_' . $index ) ); self::$methods[] = 'button_' . $index; // Htmls. add_action( 'astra_header_html_' . $index, array( $this, 'header_html_' . $index ) ); self::$methods[] = 'header_html_' . $index; // Social Icons. add_action( 'astra_header_social_' . $index, array( $this, 'header_social_' . $index ) ); self::$methods[] = 'header_social_' . $index; // Menus. add_action( 'astra_header_menu_' . $index, array( $this, 'menu_' . $index ) ); self::$methods[] = 'menu_' . $index; } add_action( 'astra_mobile_site_identity', __CLASS__ . '::site_identity' ); add_action( 'astra_header_search', array( $this, 'header_search' ), 10, 1 ); add_action( 'astra_header_woo_cart', array( $this, 'header_woo_cart' ) ); add_action( 'astra_header_edd_cart', array( $this, 'header_edd_cart' ) ); add_action( 'astra_header_account', array( $this, 'header_account' ) ); add_action( 'astra_header_mobile_trigger', array( $this, 'header_mobile_trigger' ) ); // Load Cart Flyout Markup on Footer. add_action( 'astra_footer', array( $this, 'mobile_cart_flyout' ) ); add_action( 'astra_header_menu_mobile', array( $this, 'header_mobile_menu_markup' ) ); } add_action( 'astra_site_identity', __CLASS__ . '::site_identity' ); }
Expand full source code Collapse full source code View on Trac