'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 .= '';
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' );
$custom_header = array(
'default-image' => 'http://lorempixel.com/1500/200/',
'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_pagenavi' ) ) {
function babaturan_pagenavi( $p = 5 ) { // pages will be show before and after current page
global $smof_data;
if ( is_singular() ) return; // don't show in single page
global $wp_query, $paged;
$max_page = $wp_query->max_num_pages;
if ( $max_page == 1 ) return; // don't show when only one page
if ( empty( $paged ) ) $paged = 1;
echo ''; //end pagination container
}
}
if ( ! function_exists( 'p_link' ) ) {
function p_link( $i, $title = '' ) {
global $smof_data;
if ( $title == '' ) $title = __('Page','babaturan-text').' '.$i;
echo "{$i}";
}
}
/*-----------------------------------------------------------------------------------*/
/* comments */
/*-----------------------------------------------------------------------------------*/
if( ! function_exists( 'babaturan_comment_callback' )){
function babaturan_comment_callback($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'div' == $args['style'] ) {
$tag = 'div';
$add_below = 'comment';
} else {
$tag = 'li';
$add_below = 'div-comment';
}
?>
< id="comment-">
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' => '',
) );
/*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' => '',
) );
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' => '',
) );
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' => '',
) );
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' => '',
) );*/
}
add_action( 'widgets_init', 'babaturan_widgets_init' );
?>
%s
'), get_comment_author_link() ); ?> comment_approved == '0' ) : ?>