__( 'Top Menu', 'abulogics' ),
'primary' => __( 'Primary Menu', 'abulogics' ),
) );
/*
* 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'
) );
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css') );
}
endif; // abulogics_init
add_action( 'after_setup_theme', 'abulogics_init' );
/**
* Sidebars.
*
*/
function abulogics_widgets_init() {
register_sidebar( array(
'name' => __( 'Blog Sidebar', 'abulogics' ),
'id' => 'blog-sidebar',
'description' => __( 'Add widgets here to appear in your sidebar.', 'abulogics' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 1', 'abulogics' ),
'id' => 'footer-sidebar-1',
'description' => __( 'Add widgets here to appear in your footer area.', 'abulogics' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 2', 'abulogics' ),
'id' => 'footer-sidebar-2',
'description' => __( 'Add widgets here to appear in your footer area.', 'abulogics' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 3', 'abulogics' ),
'id' => 'footer-sidebar-3',
'description' => __( 'Add widgets here to appear in your footer area.', 'abulogics' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'abulogics_widgets_init' );
/**
* Enqueue scripts and styles.
*
*/
function abulogics_scripts() {
global $wp_styles;
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
// Adds bootstrap JavaScript.
wp_enqueue_script( 'abulogics-bootstrap-js', get_template_directory_uri() . '/library/bootstrap/js/bootstrap.min.js', array( 'jquery' ) );
// Loads our bootstrap.
wp_enqueue_style( 'abulogics-bootstrap-style', get_template_directory_uri(). '/library/bootstrap/css/bootstrap.min.css' );
// Loads our main stylesheet.
wp_enqueue_style( 'abulogics-style', get_stylesheet_uri(), array( 'abulogics-bootstrap-style' ) );
// Adds JavaScript for handling the navigation menu hide-and-show behavior.
wp_enqueue_script( 'abulogics-navigation', get_template_directory_uri() . '/library/menu/script.js', array( 'jquery' ), '20150217', true );
// Loads the Font Awesome.
wp_enqueue_style( 'abulogics-fontawesome', get_template_directory_uri() . '/library/custom/css/font-awesome.min.css', array( 'abulogics-style' ));
}
add_action( 'wp_enqueue_scripts', 'abulogics_scripts' );
/*--------------------------------------------------------------
# Google Fonts
--------------------------------------------------------------*/
if ( ! function_exists( 'abulogics_fonts_url' ) ) :
function abulogics_fonts_url() {
$fonts_url = '';
/* Translators: If there are characters in your language that are not
* supported by Open Sans, translate this to 'off'. Do not translate
* into your own language.
*/
$source_sans = _x( 'on', 'Source Sans Pro font: on or off', 'abulogics' );
$font_families = array();
if ( 'off' !== $source_sans ) {
$font_families[] = 'Source Sans Pro:300,400';
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
}
return esc_url_raw( $fonts_url );
}
endif;
function abulogics_scripts_styles() {
wp_enqueue_style( 'abulogics-fonts', abulogics_fonts_url(), array(), null );
}
add_action( 'wp_enqueue_scripts', 'abulogics_scripts_styles' );
/*-----------------------------
# Sizes
-------------------------------*/
add_image_size('recent_post_image',100,100, true);
add_image_size('related-post-image-sidebar',200,150, true);
add_image_size('related-post-image-full',340,250, true);
add_image_size('slider_image',642,300, true); // 642 pixels wide by 300 pixels tall, hard crop mode
/**
* Add a `screen-reader-text` class to the search form's submit button.
*/
function abulogics_search_form_modify( $html ) {
return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html );
}
add_filter( 'get_search_form', 'abulogics_search_form_modify' );
/**
* Custom template tags for this theme.
*
*/
function abulogics_excerpt_more( $more ) {
return '' . __('Read More', 'abulogics') . '
';
}
add_filter( 'excerpt_more', 'abulogics_excerpt_more' );
// Navthemes Custom Function File
require_once( dirname( __FILE__ ) . '/inc/template-tags.php' );
require_once( dirname( __FILE__ ) . '/inc/breadcrumbs.php' );