100, 'width' => 400, 'flex-width' => true, 'flex-height' => true, ) ); add_theme_support( 'customizer' ); add_theme_support( 'custom-header', array( 'width' => 1920, 'height' => 300, 'flex-height' => true, 'header-text' => false, 'unlink-homepage-logo' => true, ) ); add_theme_support( 'custom-background', array( 'default-color' => '', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'default-attachment' => '', ) ); add_theme_support( 'align-wide' ); // Add support for Translation load_theme_textdomain( 'ca-simplex-blog', get_template_directory() . '/languages' ); //------------------Include Bootstap--------------- function my_theme_enqueue_styles() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css' ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array( 'jquery' ), '', true ); wp_enqueue_script( 'custom-js', get_template_directory_uri() . '/menu/menu.js', array( 'jquery' ), '1.0', true ); wp_enqueue_style( 'custom-css', get_template_directory_uri() . '/menu/menu.css', array(), '1.0', 'all' ); wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css2?family=Font+Name&display=swap', array(), '1.0.0' ); wp_enqueue_style( 'custom-style1', get_stylesheet_directory_uri() . '/inc/customizer-button/customizer-custom.css' ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); //-------------------------Header Code-------------------------------- function ca_simplex_blog_register_my_menu() { register_nav_menu('primary-menu',__( 'Primary Menu', 'ca-simplex-blog' )); } function my_theme_wp_nav_menu_args( $args = '' ) { $args['fallback_cb'] = 'wp_page_menu'; return $args; } add_filter( 'wp_nav_menu_args', 'my_theme_wp_nav_menu_args' ); add_action( 'init', 'ca_simplex_blog_register_my_menu' ); function ca_simplex_blog_mytheme_scripts() { wp_enqueue_style('mytheme-style', get_stylesheet_uri()); } add_action('wp_enqueue_scripts', 'ca_simplex_blog_mytheme_scripts'); //---------------Include Files---------------------- /* Customizer additions. */ require get_template_directory() . '/inc/custom-customizer.php'; require get_template_directory() . '/inc/customizer.php'; //--------------------------Radio Button Customizer Function-------------- /*Radio Button sanitization*/ function ca_simplex_blog_sanitize_choices( $input, $setting ) { global $wp_customize; $control = $wp_customize->get_control( $setting->id ); if ( array_key_exists( $input, $control->choices ) ) { return $input; } else { return $setting->default; } } //-------------------sidebar------------------ function ca_simplex_blog_theme_register_sidebars() { register_sidebar( array( 'name' => __( 'Primary Sidebar', 'ca-simplex-blog' ), 'id' => 'primary-sidebar', 'description' => __( 'Widgets in this area will be shown in the sidebar.', 'ca-simplex-blog' ), 'before_widget' => '
', 'before_title' => 'This is my custom block pattern
', ) ); } } add_action( 'init', 'ca_simplex_blog_mytheme_register_block_patterns' ); function ca_simplex_blog_mytheme_add_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'admin_init', 'ca_simplex_blog_mytheme_add_editor_styles' ); //------------------------Comments------------- function enable_threaded_comments() { if (is_singular() && comments_open() && (get_option('thread_comments') == 1)) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'enable_threaded_comments'); // ----------------------------Menu navigation keyboard-------------- function add_tabindex_to_menu_items( $atts, $item, $args, $depth ) { // Add tabindex="0" to the menu item $atts['tabindex'] = '0'; return $atts; } add_filter( 'nav_menu_link_attributes', 'add_tabindex_to_menu_items', 10, 4 ); //--------------------Define-------------------- define('CA_SIMPLEX_BLOG_PRO_URL',__('https://wpthemes.chitrarchana.com/ca-simplex-blog-premuim-theme/','ca-simplex-blog')); define('CA_SIMPLEX_BLOG_PRO_SUPPORT',__('https://wpthemes.chitrarchana.com/support/','ca-simplex-blog')); define('CA_SIMPLEX_BLOG_PRO_DEMO',__('https://simplexpro.chitrarchana.com/','ca-simplex-blog')); define('CA_SIMPLEX_BLOG_PRO_DOCUMENTATION',__('https://wpthemes.chitrarchana.com/docs/ca-simplex-blog-free-theme-docs/','ca-simplex-blog'));