Astra_Builder_Helper::initialize()
Initialize function.
Description
Source
File: inc/core/builder/class-astra-builder-helper.php
public function initialize() {
self::$footer_row_layouts = apply_filters(
'astra_footer_row_layout',
array(
'desktop' => array(
'6' => array(
'6-equal' => array(
'icon' => 'sixcol',
),
),
'5' => array(
'5-equal' => array(
'icon' => 'fivecol',
),
),
'4' => array(
'4-equal' => array(
'icon' => 'fourcol',
),
'4-lheavy' => array(
'icon' => 'lfourforty',
),
'4-rheavy' => array(
'icon' => 'rfourforty',
),
),
'3' => array(
'3-equal' => array(
'icon' => 'threecol',
),
'3-lheavy' => array(
'icon' => 'lefthalf',
),
'3-rheavy' => array(
'icon' => 'righthalf',
),
'3-cheavy' => array(
'icon' => 'centerhalf',
),
'3-cwide' => array(
'icon' => 'widecenter',
),
),
'2' => array(
'2-equal' => array(
'icon' => 'twocol',
),
'2-lheavy' => array(
'icon' => 'twoleftgolden',
),
'2-rheavy' => array(
'icon' => 'tworightgolden',
),
),
'1' => array(
'full' => array(
'icon' => 'row',
),
),
),
'tablet' => array(
'6' => array(
'6-equal' => array(
'tooltip' => __( 'Equal Width Columns', 'astra' ),
'icon' => 'sixcol',
),
'full' => array(
'tooltip' => __( 'Collapse to Rows', 'astra' ),
'icon' => 'collapserowsix',
),
),
'5' => array(
'5-equal' => array(
'tooltip' => __( 'Equal Width Columns', 'astra' ),
'icon' => 'fivecol',
),
'full' => array(
'tooltip' => __( 'Collapse to Rows', 'astra' ),
'icon' => 'collapserowfive',
),
),
'4' => array(
'4-equal' => array(
'tooltip' => __( 'Equal Width Columns', 'astra' ),
'icon' => 'fourcol',
),
'2-equal' => array(
'tooltip' => __( 'Two Column Grid', 'astra' ),
'icon' => 'grid',
),
'full' => array(
'tooltip' => __( 'Collapse to Rows', 'astra' ),
'icon' => 'collapserowfour',
),
),
'3' => array(
'3-equal' => array(
'tooltip' => __( 'Equal Width Columns', 'astra' ),
'icon' => 'threecol',
),
'3-lheavy' => array(
'tooltip' => __( 'Left Heavy 50/25/25', 'astra' ),
'icon' => 'lefthalf',
),
'3-rheavy' => array(
'tooltip' => __( 'Right Heavy 25/25/50', 'astra' ),
'icon' => 'righthalf',
),
'3-cheavy' => array(
'tooltip' => __( 'Center Heavy 25/50/25', 'astra' ),
'icon' => 'centerhalf',
),
'3-cwide' => array(
'tooltip' => __( 'Wide Center 20/60/20', 'astra' ),
'icon' => 'widecenter',
),
'3-firstrow' => array(
'tooltip' => __( 'First Row, Next Columns 100 - 50/50', 'astra' ),
'icon' => 'firstrow',
),
'3-lastrow' => array(
'tooltip' => __( 'Last Row, Previous Columns 50/50 - 100', 'astra' ),
'icon' => 'lastrow',
),
'full' => array(
'tooltip' => __( 'Collapse to Rows', 'astra' ),
'icon' => 'collapserowthree',
),
),
'2' => array(
'2-equal' => array(
'tooltip' => __( 'Equal Width Columns', 'astra' ),
'icon' => 'twocol',
),
'2-lheavy' => array(
'tooltip' => __( 'Left Heavy 66/33', 'astra' ),
'icon' => 'twoleftgolden',
),
'2-rheavy' => array(
'tooltip' => __( 'Right Heavy 33/66', 'astra' ),
'icon' => 'tworightgolden',
),
'full' => array(
'tooltip' => __( 'Collapse to Rows', 'astra' ),
'icon' => 'collapserow',
),
),
'1' => array(
'full' => array(
'tooltip' => __( 'Single Row', 'astra' ),
'icon' => 'row',
),
),
),
'mobile' => array(
'6' => array(
'6-equal' => array(
'tooltip' => __( 'Equal Width Columns', 'astra' ),
'icon' => 'sixcol',
),
'full' => array(
'tooltip' => __( 'Collapse to Rows', 'astra' ),
'icon' => 'collapserowsix',
),
),
'5' => array(
'5-equal' => array(
'tooltip' => __( 'Equal Width Columns', 'astra' ),
'icon' => 'fivecol',
),
'full' => array(
'tooltip' => __( 'Collapse to Rows', 'astra' ),
'icon' => 'collapserowfive',
),
),
'4' => array(
'4-equal' => array(
'icon' => 'fourcol',
),
'2-equal' => array(
'icon' => 'grid',
),
'full' => array(
'icon' => 'collapserowfour',
),
),
'3' => array(
'3-equal' => array(
'icon' => 'threecol',
),
'3-lheavy' => array(
'icon' => 'lefthalf',
),
'3-rheavy' => array(
'icon' => 'righthalf',
),
'3-cheavy' => array(
'icon' => 'centerhalf',
),
'3-cwide' => array(
'icon' => 'widecenter',
),
'3-firstrow' => array(
'icon' => 'firstrow',
),
'3-lastrow' => array(
'icon' => 'lastrow',
),
'full' => array(
'icon' => 'collapserowthree',
),
),
'2' => array(
'2-equal' => array(
'icon' => 'twocol',
),
'2-lheavy' => array(
'icon' => 'twoleftgolden',
),
'2-rheavy' => array(
'icon' => 'tworightgolden',
),
'full' => array(
'icon' => 'collapserow',
),
),
'1' => array(
'full' => array(
'icon' => 'row',
),
),
),
'responsive' => true,
)
);
self::$header_desktop_items = apply_filters(
'astra_header_desktop_items',
array(
'logo' => array(
'name' => __( 'Site Title & Logo', 'astra' ),
'icon' => 'admin-appearance',
'section' => 'title_tagline',
'delete' => false,
),
'search' => array(
'name' => __( 'Search', 'astra' ),
'icon' => 'search',
'section' => 'section-header-search',
'delete' => false,
),
'account' => array(
'name' => __( 'Account', 'astra' ),
'icon' => 'admin-users',
'section' => 'section-header-account',
'delete' => false,
),
)
);
// Add an additional item conditionally.
if ( ! defined( 'ASTRA_EXT_VER' ) ) {
$pro_header_desktop_items = array(
'divider-2' => array(
'name' => __( 'Divider 2', 'astra' ),
'icon' => 'minus',
'section' => 'section-hb-divider-2',
'pro' => true,
),
'divider-3' => array(
'name' => __( 'Divider 3', 'astra' ),
'icon' => 'minus',
'section' => 'section-hb-divider-3',
'pro' => true,
),
'language-switcher' => array(
'name' => __( 'Language Switcher', 'astra' ),
'icon' => 'translation',
'section' => 'section-hb-language-switcher',
'pro' => true,
),
'mobile-trigger' => array(
'name' => __( 'Toggle Button', 'astra' ),
'icon' => 'menu-alt',
'section' => 'section-header-mobile-trigger',
'pro' => true,
),
'mobile-menu' => array(
'name' => __( 'Off-Canvas Menu', 'astra' ),
'icon' => 'menu-alt',
'section' => 'section-header-mobile-menu',
'pro' => true,
),
'button-2' => array(
'name' => __( 'Button 2', 'astra' ),
'icon' => 'button',
'section' => 'section-hb-button-2',
'pro' => true,
),
'html-3' => array(
'name' => __( 'HTML 3', 'astra' ),
'icon' => 'editor-code',
'section' => 'section-hb-html-3',
'pro' => true,
),
'widget-3' => array(
'name' => __( 'Widget 3', 'astra' ),
'icon' => 'screenoptions',
'section' => 'sidebar-widgets-header-widget-3',
'pro' => true,
),
'widget-4' => array(
'name' => __( 'Widget 4', 'astra' ),
'icon' => 'screenoptions',
'section' => 'sidebar-widgets-header-widget-4',
'pro' => true,
),
'menu-3' => array(
'name' => __( 'Menu 3', 'astra' ),
'icon' => 'menu',
'section' => 'section-hb-menu-3',
'pro' => true,
),
);
// Merge the additional items into the existing header desktop items.
self::$header_desktop_items = array_merge( self::$header_desktop_items, $pro_header_desktop_items );
}
self::$footer_desktop_items = apply_filters(
'astra_footer_desktop_items',
array(
'copyright' => array(
'name' => 'Copyright',
'icon' => 'nametag',
'section' => 'section-footer-copyright',
'delete' => false,
),
'menu' => array(
'name' => 'Footer Menu',
'icon' => 'menu',
'section' => 'section-footer-menu',
'delete' => false,
),
)
);
// Add an additional item conditionally.
if ( ! defined( 'ASTRA_EXT_VER' ) ) {
$pro_footer_desktop_items = array(
'divider-2' => array(
'name' => __( 'Divider 2', 'astra' ),
'icon' => 'minus',
'pro' => true,
),
'divider-3' => array(
'name' => __( 'Divider 3', 'astra' ),
'icon' => 'minus',
'pro' => true,
),
'widget-5' => array(
'name' => __( 'Widget 5', 'astra' ),
'icon' => 'screenoptions',
'pro' => true,
),
'widget-6' => array(
'name' => __( 'Widget 6', 'astra' ),
'icon' => 'screenoptions',
'pro' => true,
),
'button-1' => array(
'name' => __( 'Button 1', 'astra' ),
'icon' => 'button',
'pro' => true,
),
'button-2' => array(
'name' => __( 'Button 2', 'astra' ),
'icon' => 'button',
'pro' => true,
),
);
// Merge the additional items into the existing header desktop items.
self::$footer_desktop_items = array_merge( self::$footer_desktop_items, $pro_footer_desktop_items );
}
if ( class_exists( 'Astra_Woocommerce' ) ) {
$woo_cart_name = class_exists( 'Easy_Digital_Downloads' ) ? __( 'Woo Cart', 'astra' ) : __( 'Cart', 'astra' );
self::$header_desktop_items['woo-cart'] = array(
'name' => $woo_cart_name,
'icon' => 'cart',
'section' => 'section-header-woo-cart',
);
}
if ( class_exists( 'Easy_Digital_Downloads' ) ) {
$edd_cart_name = class_exists( 'Astra_Woocommerce' ) ? __( 'EDD Cart', 'astra' ) : __( 'Cart', 'astra' );
self::$header_desktop_items['edd-cart'] = array(
'name' => $edd_cart_name,
'icon' => 'cart',
'section' => 'section-header-edd-cart',
);
}
self::$header_mobile_items = apply_filters(
'astra_header_mobile_items',
array(
'logo' => array(
'name' => __( 'Site Title & Logo', 'astra' ),
'icon' => 'admin-appearance',
'section' => 'title_tagline',
),
'search' => array(
'name' => __( 'Search', 'astra' ),
'icon' => 'search',
'section' => 'section-header-search',
),
'mobile-trigger' => array(
'name' => __( 'Toggle Button', 'astra' ),
'icon' => 'menu-alt',
'section' => 'section-header-mobile-trigger',
),
'mobile-menu' => array(
'name' => __( 'Off-Canvas Menu', 'astra' ),
'icon' => 'menu-alt',
'section' => 'section-header-mobile-menu',
),
'account' => array(
'name' => __( 'Account', 'astra' ),
'icon' => 'admin-users',
'section' => 'section-header-account',
),
)
);
// Add an additional item conditionally.
if ( ! defined( 'ASTRA_EXT_VER' ) ) {
$pro_header_mobile_items = array(
'divider-1' => array(
'name' => __( 'Divider 1', 'astra' ),
'icon' => 'minus',
'pro' => true,
),
'divider-2' => array(
'name' => __( 'Divider 2', 'astra' ),
'icon' => 'minus',
'pro' => true,
),
'divider-3' => array(
'name' => __( 'Divider 3', 'astra' ),
'icon' => 'minus',
'pro' => true,
),
'language-switcher' => array(
'name' => __( 'Language Switcher', 'astra' ),
'icon' => 'translation',
'pro' => true,
),
'button-2' => array(
'name' => __( 'Button 2', 'astra' ),
'icon' => 'button',
'pro' => true,
),
'html-3' => array(
'name' => __( 'HTML 3', 'astra' ),
'icon' => 'text',
'pro' => true,
),
'widget-3' => array(
'name' => __( 'Widget 3', 'astra' ),
'icon' => 'wordpress',
'pro' => true,
),
'widget-4' => array(
'name' => __( 'Widget 4', 'astra' ),
'icon' => 'wordpress',
'pro' => true,
),
'menu-3' => array(
'name' => __( 'Menu 3', 'astra' ),
'icon' => 'menu',
'pro' => true,
),
);
// Merge the additional items into the existing header desktop items.
self::$header_mobile_items = array_merge( self::$header_mobile_items, $pro_header_mobile_items );
}
if ( class_exists( 'Astra_Woocommerce' ) ) {
self::$header_mobile_items['woo-cart'] = array(
'name' => $woo_cart_name,
'icon' => 'cart',
'section' => 'section-header-woo-cart',
);
}
if ( class_exists( 'Easy_Digital_Downloads' ) ) {
self::$header_mobile_items['edd-cart'] = array(
'name' => $edd_cart_name,
'icon' => 'cart',
'section' => 'section-header-edd-cart',
);
}
add_filter( 'astra_addon_list', array( $this, 'deprecate_old_header_and_footer' ) );
}
Expand full source code Collapse full source code View on Trac