Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fullframe_primary_menu() {
- $options = fullframe_get_theme_options();
- ?>
- <nav class="nav-primary" role="navigation">
- <div class="wrapper">
- <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'full-frame-pro' ); ?>"><?php esc_html_e( 'Skip to content', 'full-frame-pro' ); ?></a></div>
- <?php
- if ( '1' != $options['responsive_select'] ) {
- // Header Left Mobile Menu Anchor
- $flag = 1;
- if ( '1' != $options['primary_menu_disable'] ) {
- if ( has_nav_menu( 'primary' ) ) {
- $classes = "mobile-menu-anchor primary-menu";
- }
- else {
- $classes = "mobile-menu-anchor page-menu";
- }
- }
- elseif ( has_nav_menu( 'secondary' ) ) {
- $classes = "mobile-menu-anchor secondary-menu";
- }
- else {
- $classes = "mobile-menu-anchor displaynone";
- $flag = 0;
- }
- if ( $flag ) {
- ?>
- <div id="mobile-header-left-menu" class="<?php echo $classes; ?>">
- <a href="#mobile-header-left-nav" id="header-left-menu" class="genericon genericon-menu">
- <span class="mobile-menu-text"><?php esc_html_e( 'Menu', 'full-frame-pro' );?></span>
- </a>
- </div><!-- #mobile-header-menu -->
- <?php
- }
- }
- $logo_alt = ( '' != $options['logo_alt_text'] ) ? $options['logo_alt_text'] : get_bloginfo( 'name', 'display' );
- if ( isset( $options[ 'logo_icon' ] ) && $options[ 'logo_icon' ] != '' && !empty( $options[ 'logo_icon' ] ) ){
- echo '<div id="logo-icon"><a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" rel="home">
- <img src="' . esc_url( $options['logo_icon'] ) . '" alt="' . esc_attr( $logo_alt ). '">
- </a></div>';
- }
- if ( '1' != $options['primary_menu_disable'] ) {
- echo '<h1 class="assistive-text">' . esc_html__( 'Primary Menu', 'full-frame-pro' ) . '</h1>';
- if ( has_nav_menu( 'primary' ) ) {
- $fullframe_primary_menu_args = array(
- 'theme_location' => 'primary',
- 'menu_class' => 'menu fullframe-nav-menu',
- 'container' => false
- );
- wp_nav_menu( $fullframe_primary_menu_args );
- }
- else {
- wp_page_menu( array( 'menu_class' => 'menu fullframe-nav-menu' ) );
- }
- }
- if( '1' != $options['header_toggle_disable'] ) {
- ?>
- <div id="header-toggle" class="genericon">
- <a class="screen-reader-text" href="#header-container"><?php esc_html_e( 'Header Toggle', 'full-frame-pro' ); ?></a>
- </div>
- <?php
- }
- elseif ( '1' != $options['primary_menu_disable'] && has_nav_menu( 'secondary' ) ) {
- $classes = "mobile-menu-anchor secondary-menu";
- // Header Right Mobile Menu Anchor
- ?>
- <div id="mobile-header-right-menu" class="<?php echo $classes; ?>">
- <a href="#mobile-header-right-nav" id="header-right-menu" class="genericon genericon-menu">
- <span class="mobile-menu-text"><?php esc_html_e( 'Menu', 'full-frame-pro' );?></span>
- </a>
- </div><!-- #mobile-header-menu -->
- <?php
- }
- ?>
- <?php
- //Social Icons inline with primary menu
- if ( '' != ( $fullframe_social_icons = fullframe_get_social_icons() ) ) { ?>
- <div id="social_icons_menu" class="widget_fullframe_social_icons">
- <?php echo $fullframe_social_icons; ?>
- </div>
- <?php } ?>
- </div><!-- .wrapper -->
- </nav><!-- .nav-primary -->
- <?php
- }
- function fullframe_menu_under_site_branding() {
- remove_action( 'fullframe_header', 'fullframe_fixed_header_start', 20 );
- remove_action( 'fullframe_header', 'fullframe_fixed_header_end', 80 );
- remove_action( 'fullframe_header', 'fullframe_primary_menu', 30 );
- add_action( 'fullframe_header', 'fullframe_fixed_header_start', 60 );
- add_action( 'fullframe_header', 'fullframe_fixed_header_end', 80 );
- add_action( 'fullframe_header', 'fullframe_primary_menu', 70 );
- }
- add_action('init', 'fullframe_menu_under_site_branding');
- function fullframe_masthead() {
- //Getting Ready to load options data
- $options = fullframe_get_theme_options();
- if ( '1' == $options['logo_disable'] && '1' == $options['disable_header_right_sidebar'] && '1' !=display_header_text() ) {
- return;
- }
- if ( '1' != $options['header_toggle_disable'] ) {
- add_action( 'fullframe_header', 'fullframe_header_start', 40 );
- add_action( 'fullframe_header', 'fullframe_site_branding', 50 );
- add_action( 'fullframe_header', 'fullframe_header_right', 60 );
- add_action( 'fullframe_header', 'fullframe_header_end', 70 );
- }
- else {
- add_action( 'fullframe_header', 'fullframe_header_start', 20 );
- add_action( 'fullframe_header', 'fullframe_site_branding', 30 );
- add_action( 'fullframe_header', 'fullframe_header_right', 40 );
- add_action( 'fullframe_header', 'fullframe_header_end', 50 );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement