'000000', 'default-image' => '', 'default-repeat' => 'repeat', 'default-position-x' => 'center', 'default-position-y' => 'top', 'default-size' => 'auto', 'default-attachment' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ) ); } // Replace default fonts from parent theme function martanda_get_font_face_styles() { return " @font-face{ font-family: 'Teko'; font-weight: 100; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 200; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 300; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 400; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 500; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 600; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 700; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 800; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } @font-face{ font-family: 'Teko'; font-weight: 900; font-style: normal; font-stretch: normal; font-display: swap; src: url('" . get_stylesheet_directory_uri() . "/fonts/Teko.woff2') format('woff2'); } "; } function martanda_font_family_css() { // Get our settings $martanda_settings = wp_parse_args( get_option( 'martanda_settings', array() ), martanda_get_defaults() ); // Initiate our class $css = new martanda_css; $og_defaults = martanda_get_defaults( false ); $bodyclass = 'body'; if ( is_admin() ) { $bodyclass = '.editor-styles-wrapper'; } $bodyfont = $martanda_settings[ 'font_body' ]; if ( $bodyfont == 'inherit' ) { $bodyfont = 'Teko'; } $font_site_title = $martanda_settings[ 'font_site_title' ]; if ( $font_site_title == 'inherit' ) { $font_site_title = 'Teko'; } $font_navigation = $martanda_settings[ 'font_navigation' ]; if ( $font_navigation == 'inherit' ) { $font_navigation = 'Teko'; } $font_buttons = $martanda_settings[ 'font_buttons' ]; if ( $font_buttons == 'inherit' ) { $font_buttons = 'Teko'; } $font_heading_1 = $martanda_settings[ 'font_heading_1' ]; if ( $font_heading_1 == 'inherit' ) { $font_heading_1 = 'Teko'; } $font_heading_2 = $martanda_settings[ 'font_heading_2' ]; if ( $font_heading_2 == 'inherit' ) { $font_heading_2 = 'Teko'; } $font_heading_3 = $martanda_settings[ 'font_heading_3' ]; if ( $font_heading_3 == 'inherit' ) { $font_heading_3 = 'Teko'; } $font_heading_4 = $martanda_settings[ 'font_heading_4' ]; if ( $font_heading_4 == 'inherit' ) { $font_heading_4 = 'Teko'; } $font_heading_5 = $martanda_settings[ 'font_heading_5' ]; if ( $font_heading_5 == 'inherit' ) { $font_heading_5 = 'Teko'; } $font_heading_6 = $martanda_settings[ 'font_heading_6' ]; if ( $font_heading_6 == 'inherit' ) { $font_heading_6 = 'Teko'; } $font_footer = $martanda_settings[ 'font_footer' ]; if ( $font_footer == 'inherit' ) { $font_footer = 'Teko'; } $font_fixed_side = $martanda_settings[ 'font_fixed_side' ]; if ( $font_fixed_side == 'inherit' ) { $font_fixed_side = 'Teko'; } $css->set_selector( $bodyclass ); $css->add_property( '--martanda--font-body', esc_attr( $bodyfont ) ); $css->add_property( '--martanda--font-site-title', esc_attr( $font_site_title ) ); $css->add_property( '--martanda--font-navigation', esc_attr( $font_navigation ) ); $css->add_property( '--martanda--font-buttons', esc_attr( $font_buttons ) ); $css->add_property( '--martanda--font-heading-1', esc_attr( $font_heading_1 ) ); $css->add_property( '--martanda--font-heading-2', esc_attr( $font_heading_2 ) ); $css->add_property( '--martanda--font-heading-3', esc_attr( $font_heading_3 ) ); $css->add_property( '--martanda--font-heading-4', esc_attr( $font_heading_4 ) ); $css->add_property( '--martanda--font-heading-5', esc_attr( $font_heading_5 ) ); $css->add_property( '--martanda--font-heading-6', esc_attr( $font_heading_6 ) ); $css->add_property( '--martanda--font-footer', esc_attr( $font_footer ) ); $css->add_property( '--martanda--font-fixed-side', esc_attr( $font_fixed_side ) ); $css->set_selector( '.editor-styles-wrapper .top-bar-socials button' ); $css->add_property( 'background-color', 'inherit' ); // Allow us to hook CSS into our output do_action( 'martanda_font_family_css', $css ); return apply_filters( 'martanda_font_family_css_output', $css->css_output() ); } // Overwrite theme URL function martanda_theme_uri_link() { return 'https://wpkoi.com/agami-wpkoi-wordpress-theme/'; } // Extra cutomizer functions if ( ! function_exists( 'agami_customize_register' ) ) { add_action( 'customize_register', 'agami_customize_register' ); function agami_customize_register( $wp_customize ) { // Add Agami customizer section $wp_customize->add_section( 'agami_layout_effects', array( 'title' => __( 'Navigation effect', 'agami' ), 'priority' => 24, ) ); // Navigation effect $wp_customize->add_setting( 'agami_settings[nav_underline]', array( 'default' => 'enable', 'type' => 'option', 'sanitize_callback' => 'agami_sanitize_choices' ) ); $wp_customize->add_control( 'agami_settings[nav_underline]', array( 'type' => 'select', 'label' => __( 'Navigation hover effect', 'agami' ), 'choices' => array( 'enable' => __( 'Enable', 'agami' ), 'disable' => __( 'Disable', 'agami' ) ), 'settings' => 'agami_settings[nav_underline]', 'section' => 'agami_layout_effects', 'priority' => 30 ) ); } } //Sanitize choices. if ( ! function_exists( 'agami_sanitize_choices' ) ) { function agami_sanitize_choices( $input, $setting ) { // Ensure input is a slug $input = sanitize_key( $input ); // Get list of choices from the control // associated with the setting $choices = $setting->manager->get_control( $setting->id )->choices; // If the input is a valid key, return it; // otherwise, return the default return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } } //Adds custom classes to the array of body classes. if ( ! function_exists( 'agami_body_classes' ) ) { add_filter( 'body_class', 'agami_body_classes' ); function agami_body_classes( $classes ) { // Get Customizer settings $agami_settings = get_option( 'agami_settings' ); $nav_underline = 'enable'; if ( isset( $agami_settings['nav_underline'] ) ) { $nav_underline = $agami_settings['nav_underline']; } // Navigation effect if ( $nav_underline != 'disable' ) { $classes[] = 'agami-nav-underline'; } return $classes; } }