__( 'Primary Menu', 'business-max' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Custom logo * Add theme support for custom logo. https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'flex-width' => true, ) ); // Add custom header support. https://codex.wordpress.org/Custom_Headers $args = array( 'width' => 1600, 'flex-width' => true, 'default-image' => '', 'header-text' => false, ); add_theme_support( 'custom-header', $args ); // Add custom background support. https://codex.wordpress.org/Custom_Backgrounds add_theme_support( 'custom-background', array( 'default-color' => '#ffffff', ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); } } add_action( 'after_setup_theme', 'business_max_setup' ); /** * Register Google Fonts. * * @since 0.1 * * @return string */ if ( ! function_exists( 'business_max_fonts' ) ) : function business_max_fonts() { $fontsurl = ''; $open_sans = _x( 'on', 'Open Sans font: on or off', 'business-max' ); $Ubuntu = _x( 'on', 'Ubuntu font: on or off', 'business-max' ); if ( 'off' !== $Ubuntu || 'off' !== $open_sans ) { $fontfamilies = array(); if ( 'off' !== $Ubuntu ) { $fontfamilies[] = 'Ubuntu:400,500,600,700,300,100,800,900'; } if ( 'off' !== $open_sans ) { $fontfamilies[] = 'Open Sans:400,300,300italic,400italic,600,600italic,700,700italic'; } $option = wp_parse_args( get_option( 'business_max_option', array() ), business_max_data() ); $query_args = array( 'family' => urlencode( implode( '|', $fontfamilies ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fontsurl = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fontsurl ); } endif; /** * Filter WP Title tags. * * @since 1.1 * * @param string $title site title * @param string $sep separator value * @return string */ function business_max_title_filter( $title, $sep ){ global $paged, $page; if( is_home() ){ return $title; } if ( is_feed() ) return $title; // Add the site name. $title .= esc_html( get_bloginfo( 'name' ) ); // Add the site description for the home/front page. $site_description = esc_html( get_bloginfo( 'description' ) ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page', 'business-max' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'business_max_title_filter', 10,2 ); /*.................................... .... Files Includes ....................................*/ include_once get_theme_file_path( 'functions/frameworks/kirki/kirki.php' ); // default data file include require get_parent_theme_file_path( '/functions/default_data.php' ); // extra functions file include require get_parent_theme_file_path( '/functions/extra.php' ); // script file include require get_parent_theme_file_path( '/functions/script/script.php' ); // sidebar file include require get_parent_theme_file_path( '/functions/widget/sidebar.php' ); // template tag file include require get_parent_theme_file_path( '/functions/template-tags.php' ); // menu file include require get_parent_theme_file_path( '/functions/menu/default_menu_walker.php' ); require get_parent_theme_file_path( '/functions/menu/theme_navwalker.php' ); // breadcrumbs file include require get_parent_theme_file_path( '/functions/breadcrumbs/breadcrumbs.php' ); // customizer file include require get_parent_theme_file_path( '/functions/customizer/customizer.php' ); // theme functions file include require get_parent_theme_file_path( '/functions/theme-functions.php' ); ?>