Astra_Ext_Header_Sections_Markup::__construct()
Constructor
Description
Source
File: addons/header-sections/classes/class-astra-ext-header-sections-markup.php
public function __construct() {
add_action( 'astra_masthead_toggle_buttons', array( $this, 'astra_masthead_toggle_buttons_primary' ), 10 );
add_action( 'astra_masthead_content', array( $this, 'enable_primary_menu_button' ), 8 );
add_action( 'astra_masthead_content', array( $this, 'below_above_header_content' ), 9 );
add_filter( 'astra_masthead_get_menu_items', array( $this, 'astra_masthead_get_menu_items' ) );
/**
* Merge Above / Below Header into Primary menu for responsive devices
*/
add_filter( 'wp_page_menu_args', array( $this, 'merge_custom_page_menu_header_sections' ), 10, 2 );
add_filter( 'wp_nav_menu_items', array( $this, 'merge_custom_nav_menu_header_sections' ), 9, 2 );
/* Add Body Classes */
add_filter( 'body_class', array( $this, 'body_classes' ), 10, 1 );
add_filter( 'astra_header_class', array( $this, 'header_classes' ), 10, 1 );
add_filter( 'astra_above_header_merged_responsive', array( $this, 'above_header_merged_disable' ) );
add_filter( 'astra_below_header_merged_responsive', array( $this, 'below_header_merged_disable' ) );
// Above Header markup control.
add_filter( 'astra_above_header_disable', array( $this, 'above_header_disable' ) );
// Below Header markup control.
add_filter( 'astra_below_header_disable', array( $this, 'below_header_disable' ) );
/* Register Menu Location & Widget*/
add_action( 'init', array( $this, 'register_menu_locations_widgets' ) );
/* Add HTML Markup Above Header */
if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) {
add_action( 'astra_masthead', array( $this, 'above_header_html_markup_loader' ), 9 );
}
add_action( 'astra_above_header_toggle_buttons', array( $this, 'above_header_toggle_button' ), 10 );
/* Add HTML Markup Below Header */
if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) {
add_action( 'astra_masthead', array( $this, 'below_header_html_markup_loader' ), 11 );
}
add_action( 'astra_below_header_toggle_buttons', array( $this, 'below_header_toggle_button' ), 11 );
add_action( 'astra_get_css_files', array( $this, 'add_styles' ) );
add_action( 'astra_get_js_files', array( $this, 'add_scripts' ) );
add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 );
/**
* Metabox setup
*/
add_filter( 'astra_meta_box_options', array( $this, 'add_options' ) );
add_action( 'astra_meta_box_markup_disable_sections_after_primary_header', array( $this, 'add_options_markup' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ) );
}
Expand full source code Collapse full source code View on Trac