'babaturan-main-menu', 'menu_class' => 'nav navbar-nav navbar-right', 'menu_id' => 'main-menu', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '', 'depth' => 0, 'walker' => new wp_bootstrap_navwalker() ) ); } } if ( ! function_exists( 'nativemenu' ) ) { function nativemenu() { register_nav_menus( array( 'babaturan-main-menu' => __( 'Babaturan Main Menu','babaturan-text' ) )); } } add_action( 'init', 'nativemenu' ); require_once('assets/wp_bootstrap_navwalker.php'); /* Launch the Hybrid Core framework. */ require_once( trailingslashit( get_template_directory() ) . 'assets/hybrid/extensions/get-the-image.php' ); require_once( trailingslashit( get_template_directory() ) . 'assets/hybrid/classes/hybrid-media-grabber.php' ); $jetpack_active_modules = get_option('jetpack_active_modules'); if ( class_exists( 'Jetpack', false ) && $jetpack_active_modules && in_array( 'tiled-gallery', $jetpack_active_modules ) ) { if ( ! isset( $content_width ) ) $content_width = 1280; } /*-----------------------------------------------------------------------------------*/ /* misc */ /*-----------------------------------------------------------------------------------*/ if ( ! function_exists( 'babaturan_post_thumbnail')){ function babaturan_post_thumbnail(){ if ( post_password_required() || is_attachment() ) { return; } if ( ! is_singular() ) : ?>
'original', 'image_class' => 'aligncenter img-responsive' )); ?>
'. the_author_posts_link() .''; $str .= babaturan_meta_separator(); $str .= ''. the_time($get_date) .''; $str .= babaturan_meta_separator(); $str .= ''. the_category(', ') .''; if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : $str .= babaturan_meta_separator(); $str .= ''.comments_popup_link( __( 'Leave a comment', 'babaturan-text' ), __( '1 Comment', 'babaturan-text' ), __( '% Comments', 'babaturan-text' ) ).''; endif; if ( current_user_can('edit_post','') ) : $str .= babaturan_meta_separator(); $str .= edit_post_link( __( 'Edit', 'babaturan-text' ), '', '' ); endif; echo $str; } } if (! function_exists('babaturan_meta_separator')){ function babaturan_meta_separator(){ $str = '/'; echo $str; } } /*-----------------------------------------------------------------------------------*/ /* theme support */ /*-----------------------------------------------------------------------------------*/ add_theme_support( 'post-thumbnails' ); add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', ) ); add_theme_support( 'automatic-feed-links' ); $args = array( 'default-color' => 'fefefe' ); add_theme_support( 'custom-background', $args ); $custom_header = array( 'default-image' => get_template_directory_uri().'/images/babaturan-header.jpg', 'random-default' => false, 'width' => 1500, 'height' => 200, 'flex-height' => true, 'flex-width' => true, 'default-text-color' => '', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $custom_header ); function babaturan_add_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'after_setup_theme', 'babaturan_add_editor_styles' ); /*-----------------------------------------------------------------------------------*/ /* page navigation */ /*-----------------------------------------------------------------------------------*/ if ( !function_exists('babaturan_post_nav')){ function babaturan_post_nav(){ // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> max_num_pages < 2 ) { return; } $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; $pagenum_link = html_entity_decode( get_pagenum_link() ); $query_args = array(); $url_parts = explode( '?', $pagenum_link ); if ( isset( $url_parts[1] ) ) { wp_parse_str( $url_parts[1], $query_args ); } $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; $format = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; $format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%'; // Set up paginated links. $links = paginate_links( array( 'base' => $pagenum_link, 'format' => $format, 'total' => $GLOBALS['wp_query']->max_num_pages, 'current' => $paged, 'mid_size' => 1, 'add_args' => array_map( 'urlencode', $query_args ), 'prev_text' => '', 'next_text' => '', ) ); if ( $links ) : ?> < id="comment-">
%s
', get_comment_author_link() ); ?> comment_approved == '0' ) : ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>

false ) ) . '"> '; $content .= ' ' . apply_filters( 'babaturan_link_icon', $icon ); } return $content; } } /*-----------------------------------------------------------------------------------*/ /* sidebars & widget */ /*-----------------------------------------------------------------------------------*/ function babaturan_widgets_init() { register_sidebar( array( 'name' => __( 'Primary Sidebar', 'babaturan-text' ), 'id' => 'main-sidebar', 'description' => __( 'Main sidebar that appears on the left or right', 'babaturan-text' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); /*register_sidebar( array( 'name' => __( 'Footer Widget Area 1', 'babaturan-text' ), 'id' => 'footer-bar-1', 'description' => __( '1st footer sidebar from the left', 'babaturan-text' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Widget Area 2', 'babaturan-text' ), 'id' => 'footer-bar-2', 'description' => __( '2nd footer sidebar from the left', 'babaturan-text' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Widget Area 3', 'babaturan-text' ), 'id' => 'footer-bar-3', 'description' => __( '3rd footer sidebar from the left', 'babaturan-text' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Widget Area 4', 'babaturan-text' ), 'id' => 'footer-bar-4', 'description' => __( '4th footer sidebar from the left', 'babaturan-text' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) );*/ } add_action( 'widgets_init', 'babaturan_widgets_init' ); ?>