'f1f1f1')); register_nav_menu( 'header-nav', __('Header Navi','mind') ); register_nav_menu( 'footer-nav', __('Footer Navi','mind') ); remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('admin_print_scripts', 'print_emoji_detection_script'); remove_action('wp_print_styles', 'print_emoji_styles' ); remove_action('admin_print_styles', 'print_emoji_styles'); } function mind_add_scripts() { wp_enqueue_script( 'load-js', get_template_directory_uri() . '/js/mind.js', "", '20190307' ); wp_enqueue_style( 'style', get_stylesheet_uri() ); } add_action('wp_enqueue_scripts', 'mind_add_scripts'); // Header Area Manage Function function mind_customize_register( $wp_customize ) { $wp_customize->add_section( 'custom_banner_setup', array( 'title' => __('Induction Area','mind'), 'priority' => 70, )); // Induction Area1 $wp_customize->add_setting( 'mind_theme_options1[originPage]', array( 'default' => '', 'type' => 'theme_mod', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'mind_theme_options_page1', array( 'settings' => 'mind_theme_options1[originPage]', 'label' => __('Induction Banner1','mind'), 'description' => __('You can select the fixed page you want to display in the guidance area of the top page.','mind'), 'section' => 'custom_banner_setup', 'type' => 'dropdown-pages', )); $wp_customize->add_setting( 'mind_theme_options1[originChkbox]', array( 'default' => false, 'type' => 'theme_mod', 'transport' => 'refresh', 'sanitize_callback' => 'mind_sanitize_checkbox', )); $wp_customize->add_control( 'mind_theme_options_chkbox1', array( 'settings' => 'mind_theme_options1[originChkbox]', 'label' => __('Enable','mind'), 'section' => 'custom_banner_setup', 'type' => 'checkbox', )); // Induction Area2 $wp_customize->add_setting( 'mind_theme_options2[originPage]', array( 'default' => '', 'type' => 'theme_mod', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'mind_theme_options_page2', array( 'settings' => 'mind_theme_options2[originPage]', 'label' => __('Induction Banner2','mind'), 'section' => 'custom_banner_setup', 'type' => 'dropdown-pages', )); $wp_customize->add_setting( 'mind_theme_options2[originChkbox]', array( 'default' => false, 'type' => 'theme_mod', 'transport' => 'refresh', 'sanitize_callback' => 'mind_sanitize_checkbox', )); $wp_customize->add_control( 'mind_theme_options_chkbox2', array( 'settings' => 'mind_theme_options2[originChkbox]', 'label' => __('Enable','mind'), 'section' => 'custom_banner_setup', 'type' => 'checkbox', )); // Induction Area3 $wp_customize->add_setting( 'mind_theme_options3[originPage]', array( 'default' => '', 'type' => 'theme_mod', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'mind_theme_options_page3', array( 'settings' => 'mind_theme_options3[originPage]', 'label' => __('Induction Banner3','mind'), 'section' => 'custom_banner_setup', 'type' => 'dropdown-pages', )); $wp_customize->add_setting( 'mind_theme_options3[originChkbox]', array( 'default' => false, 'type' => 'theme_mod', 'transport' => 'refresh', 'sanitize_callback' => 'mind_sanitize_checkbox', )); $wp_customize->add_control( 'mind_theme_options_chkbox3', array( 'settings' => 'mind_theme_options3[originChkbox]', 'label' => __('Enable','mind'), 'section' => 'custom_banner_setup', 'type' => 'checkbox', )); } add_action( 'customize_register', 'mind_customize_register' ); // Sanitize Function function mind_sanitize_checkbox( $input ) { if ( $input == true ) { return true; } else { return false; } } // Header Visual Function */ function mind_custom_headerimage_setup() { $args = array( 'default-text-color' => '515151', 'default-image' => '', 'height' => 250, 'width' => 960, 'max-width' => 2000, 'flex-height' => true, 'flex-width' => true, 'random-default' => false, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $args ); } add_action( 'after_setup_theme', 'mind_custom_headerimage_setup' ); // Breadcrumb Function function mind_breadcrumb(){ global $post; $str = ''; $pNum = 2; $str.= '
'; $allowed_html = array( 'a' => array( 'href' => array (), 'onclick' => array (), 'target' => array(), ), 'div' => array( 'id' => array (), 'class' => array ()), 'span' => array(), 'ul' => array(), 'li' => array(), ); echo wp_kses($str, $allowed_html ); } // Copy right Manage Function function mind_theme_customize_copyright($wp_customize_copyright){ $wp_customize_copyright->add_setting( 'copyright' , array( 'default' => esc_html(bloginfo( 'name' )), 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize_copyright->add_control( 'copyright_edit', array( 'label' => __('Copy Right', 'mind'), 'section' => 'title_tagline', 'settings' => 'copyright', 'type' => 'text', 'description' => __('Please set the character string to be displayed in the copy part of the footer.','mind'), )); } add_action( 'customize_register', 'mind_theme_customize_copyright' ); // Display Copy right function mind_get_the_copyright(){ return esc_html( get_theme_mod( 'copyright' ) ); } // Change Link Color Function function mind_custom_theme_setup( $wp_customize ) { $wp_customize->add_setting( 'link_color', array( 'default' => '#2962ff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array( 'label' => __( 'Primary Color', 'mind' ), 'section' => 'colors', 'priority' => 10, ))); $czr_color_link = ".entory-content a"; } add_action( 'customize_register', 'mind_custom_theme_setup'); // Display Link Color Styles if ( get_theme_mod( 'link_color', 'default' ) !== 'default' ) { function mind_theme_link_color() { $link_color = get_theme_mod( 'link_color' ); ?>