60, 'width' => 120, 'flex-width' => false, 'flex-height' => true, ) ); // Post Formats Support add_theme_support( 'post-formats', array( // 'aside', // 'image', 'video', 'quote', // 'link', 'gallery', // 'audio', ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Gutenberg Editor Supports */ // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); // Add support for editor styles. add_theme_support( 'editor-styles' ); // Enqueue editor styles. add_editor_style( 'style-editor.css' ); /** * Two menus registration */ register_nav_menus( array( 'header' => __( 'Header Menu', 'bittumb' ), 'footer' => __( 'Footer Menu', 'bittumb' ), ) ); /** * Content Width */ if ( ! isset( $content_width ) ) $content_width = 1170; } add_action( 'after_setup_theme', 'btb_theme_init' ); /** Theme Assets Load */ function btb_theme_assets() { wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap' ); wp_enqueue_style( 'font-awesome', '//use.fontawesome.com/releases/v5.13.0/css/all.css' ); wp_enqueue_style( 'font-awesome-shims', '//use.fontawesome.com/releases/v5.13.0/css/v4-shims.css' ); wp_enqueue_style( 'bootstrap', get_template_directory_uri().'/assets/css/bootstrap.min.css', null, '4.3.1', 'all' ); wp_enqueue_style( 'animate', get_template_directory_uri().'/assets/css/animate.css', null, false, 'all' ); wp_enqueue_style( 'bsnav', get_template_directory_uri().'/assets/css/bsnav.min.css', null, false, 'all' ); wp_enqueue_style( 'owl-carousel', get_template_directory_uri().'/assets/css/owl.carousel.css', null, '2.3.4', 'all' ); wp_enqueue_style( 'main', get_template_directory_uri().'/assets/css/main.css', null, false, 'all' ); wp_enqueue_style( 'responsive', get_template_directory_uri().'/assets/css/responsive.css', null, false, 'all' ); wp_enqueue_style( 'stylesheet', get_stylesheet_uri() ); wp_enqueue_script( 'bootstrap', get_template_directory_uri().'/assets/js/bootstrap.min.js', array( 'jquery' ), false, true ); wp_enqueue_script( 'bsnav', get_template_directory_uri().'/assets/js/bsnav.min.js', array( 'jquery' ), false, true ); wp_enqueue_script( 'owl-carousel', get_template_directory_uri().'/assets/js/owl.carousel.js', array( 'jquery' ), false, true ); wp_enqueue_script( 'popper', get_template_directory_uri().'/assets/js/popper.min.js', array( 'jquery' ), false, true ); wp_enqueue_script( 'main', get_template_directory_uri().'/assets/js/function.js', array( 'jquery' ), false, true ); /** * Comments Script */ if ( is_singular() ) wp_enqueue_script( "comment-reply" ); } add_action( 'wp_enqueue_scripts', 'btb_theme_assets' ); /** * Sidebar Registration */ function btb_theme_sidebars() { // Left sidebar register_sidebar( array( 'name' => __( 'Left Sidebar', 'bittumb' ), 'id' => 'left-sidebar', 'description' => __( 'Add widgets here to appear in the left.', 'bittumb' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); // Right sidebar register_sidebar( array( 'name' => __( 'Right Sidebar', 'bittumb' ), 'id' => 'right-sidebar', 'description' => __( 'Add widgets here to appear in the right.', 'bittumb' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); // Single Post sidebar register_sidebar( array( 'name' => __( 'Single Post Sidebar', 'bittumb' ), 'id' => 'single-post-sidebar', 'description' => __( 'Add widgets here to appear at the right in single post view.', 'bittumb' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'btb_theme_sidebars' ); /** * Blog Pagination */ function btm_pagainate_link_function(){ global $wp_query; echo paginate_links(array( 'current' => max(1,get_query_var('paged')), 'total' => $wp_query->max_num_pages, 'prev_text' => '←', 'next_text' => '→', // 'type'=>'list', //default it will return anchor )); } /** * Social Share Button */ function btm_social_share_function() { /* * Current Post's necessary info * */ $current_post_id = get_the_ID(); $current_post_title = get_the_title($current_post_id); $current_post_link = get_the_permalink($current_post_id); $current_post_thumbnail = get_the_post_thumbnail_url($current_post_id, 'full'); /* * Common Social Media Share links with current post's info * */ $fb_link = 'http://www.facebook.com/sharer/sharer.php?u=' . $current_post_link . '&t=' . $current_post_title; $tw_link = 'https://www.twitter.com/intent/tweet?text=' . $current_post_title . '&url=' . $current_post_link . '&via=ess'; $gp_link = 'https://plus.google.com/share?url=' . $current_post_link; $li_link = 'https://www.linkedin.com/shareArticle?mini=true&url=' . $current_post_link . '&title=' . $current_post_title; $pr_link = 'https://pinterest.com/pin/create/button/?url=' . $current_post_link . '&media=' . $current_post_thumbnail . '&description=' . $current_post_title; $rd_link = 'https://reddit.com/submit?url=' . $current_post_link . '&title=' . $current_post_title; $tr_link = 'https://www.tumblr.com/widgets/share/tool?canonicalUrl=' . $current_post_link . '&title=' . $current_post_title; /* * Links with icons are attached * */ $content = "
"; $content .= ""; $content .= ""; $content .= ""; $content .= ""; $content .= "
"; echo $content; } /** * Global Theme Option */ // Admin Option $btm_options = get_option( 'bittumb' ); /** * Include Libaries */ require get_template_directory().'/lib/framework/framework.php'; require get_template_directory().'/lib/theme-options.php'; // post format meta fields require get_template_directory().'/lib/post-format-meta/quote-format.php'; require get_template_directory().'/lib/post-format-meta/video-format.php'; require get_template_directory().'/lib/post-format-meta/slider-format.php'; // Custom Widgets Files require get_template_directory().'/lib/widgets.php'; // Recommended Plugins require get_template_directory().'/lib/recommended-plugins.php';