__( 'Primary Menu', 'birva' ),
) );
//Custom Header
$birva_defaults = array(
'default-image' => '',
'random-default' => false,
'width' => 0,
'height' => 0,
'flex-height' => false,
'flex-width' => false,
'default-text-color' => '',
'header-text' => true,
'uploads' => true,
'wp-head-callback' => '',
'admin-head-callback' => '',
'admin-preview-callback' => '',
);
add_theme_support( 'custom-header', $birva_defaults );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
) );
/*
* Enable support for Post Formats.
* See http://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'audio', 'gallery', 'video', 'quote'
) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'birva_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
}
endif; // birva_setup
add_action( 'after_setup_theme', 'birva_setup' );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function birva_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'birva' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '',
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'birva_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function birva_scripts() {
// Google fonts
function briva_google_fonts_one() {
$briva_query_args = array(
'family' => 'Oswald:300,400,700',
'subset' => 'latin,latin-ext',
);
wp_register_style( 'briva_google_fonts_one', add_query_arg( $briva_query_args, "//fonts.googleapis.com/css" ), array(), null );
}
add_action('wp_enqueue_scripts', 'briva_google_fonts_one');
function briva_google_fonts_two() {
$briva_query_args = array(
'family' => 'Open+Sans:400,300,400italic,600,700',
'subset' => 'latin,latin-ext',
);
wp_register_style( 'briva_google_fonts_two', add_query_arg( $briva_query_args, "//fonts.googleapis.com/css" ), array(), null );
}
add_action('wp_enqueue_scripts', 'briva_google_fonts_two');
// CSS Skeleton
wp_enqueue_style( 'base', get_template_directory_uri().'/css/base.css');
wp_enqueue_style( 'skeleton', get_template_directory_uri().'/css/skeleton.css');
// Custom Css
wp_enqueue_style( 'component', get_template_directory_uri().'/css/component.css');
wp_enqueue_style( 'font-awesome.min', get_template_directory_uri().'/css/font-awesome.min.css');
// Javascript
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
wp_enqueue_script( 'birva-navigation', get_template_directory_uri() . '/js/navigation.js', array(), false, true );
wp_enqueue_script( 'birva-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), false, true );
wp_enqueue_script( 'easing', get_template_directory_uri() . '/js/jquery.easing.min.js', array(), '', true );
wp_enqueue_script( 'retina', get_template_directory_uri() . '/js/retina.js', array(), '', true );
wp_enqueue_script( 'jquery.isotope.min', get_template_directory_uri() . '/js/jquery.isotope.min.js', array(), '', true );
wp_enqueue_script( 'masonryResponsive', get_template_directory_uri() . '/js/masonryResponsive.js', array(), '', true );
wp_enqueue_script( 'jquery.parallax-1.1.3', get_template_directory_uri() . '/js/jquery.parallax-1.1.3.js', array(), '', true );
wp_enqueue_script( 'jquery.flexisel', get_template_directory_uri() . '/js/jquery.flexisel.js', array(), '', true );
wp_enqueue_script( 'tweetable.jquery', get_template_directory_uri() . '/js/tweetable.jquery.js', array(), '', true );
wp_enqueue_script( 'jquery.timeago', get_template_directory_uri() . '/js/jquery.timeago.js', array(), '', true );
wp_enqueue_script( 'jquery.cycle.all.min', get_template_directory_uri() . '/js/jquery.cycle.all.min.js', array(), '', true );
wp_enqueue_script( 'bellows', get_template_directory_uri() . '/js/bellows.js', array(), '', true );
wp_enqueue_script( 'parallaxInit', get_template_directory_uri() . '/js/parallaxInit.js', array(), '', true );
wp_enqueue_script( 'jquery.fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array(), '', true );
wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array(), '', true );
wp_enqueue_script( 'like', get_template_directory_uri() . '/js/post-like.min.js', array(), '', true );
wp_enqueue_script( 'birva', get_template_directory_uri() . '/js/birva.js', array(), '', true );
wp_enqueue_script( 'switcher', get_template_directory_uri() . '/js/switcher.js', array(), '', true );
}
add_action( 'wp_enqueue_scripts', 'birva_scripts' );
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';
/**
* Metaboxes
*/
require get_template_directory() . '/metabox.php';
/**
* Plugins
*/
require_once(get_template_directory() . '/TGM.php');
/**
* Pagination
*/
function wpbeginner_numeric_posts_nav() {
if( is_singular() )
return;
global $wp_query;
$birva_ret = '';
/** Stop execution if there's only 1 page */
if( $wp_query->max_num_pages <= 1 )
return;
$birva_paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;
$birva_max = intval( $wp_query->max_num_pages );
/** Add current page to the array */
if ( $birva_paged >= 1 )
$birva_links[] = $birva_paged;
/** Add the pages around the current page to the array */
if ( $birva_paged >= 3 ) {
$birva_links[] = $birva_paged - 1;
$birva_links[] = $birva_paged - 2;
}
if ( ( $birva_paged + 2 ) <= $birva_max ) {
$birva_links[] = $birva_paged + 2;
$birva_links[] = $birva_paged + 1;
}
$birva_ret .= '';
return $birva_ret;
}
// comment list
function mytheme_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'div' == $args['style'] ) {
$birva_tag = 'div';
$birva_add_below = 'comment';
} else {
$birva_tag = 'li';
$birva_add_below = 'div-comment';
}
?>
< id="comment-">
Your comment is awaiting moderation