'. "\n";
echo ''. "\n";
echo ''. "\n";
echo ''. "\n";
}
add_action( 'wp_head', 'bg_ie_js_header' );
/* IE js footer
/* ------------------------------------ */
function bg_ie_js_footer () {
echo ''. "\n";
}
add_action( 'wp_footer', 'bg_ie_js_footer', 20 );
/*
* WP_Enqueue Function for Style And Script.
*/
function blogmonstor_enqueue_style() {
global $redux_demo;
if($redux_demo['stylesheet']){
if($redux_demo['stylesheet'] == 'cosmo.min.css'){
wp_enqueue_style('cosmo.min', get_stylesheet_directory_uri() . '/css/cosmo.min.css');
} else {
wp_enqueue_style('flatly', get_stylesheet_directory_uri() . '/css/flatly.css');
}}
wp_enqueue_style('style.css', get_stylesheet_directory_uri() . '/style.css');
wp_enqueue_style('font-awesome.min', get_stylesheet_directory_uri() . '/css/font-awesome.min.css');
wp_enqueue_style('flexslider', get_stylesheet_directory_uri() . '/css/flexslider.css');
wp_enqueue_style('bg-tabber-style', get_stylesheet_directory_uri() . '/css/bg-tabber-style.css');
wp_enqueue_style('fancybox', get_stylesheet_directory_uri() . '/css/source/jquery.fancybox.css?v=2.0.6');
wp_enqueue_style('fancybox-buttons', get_stylesheet_directory_uri() . '/css/source/helpers/jquery.fancybox-buttons.css');
wp_enqueue_style('jquery.fancybox-thumbs', get_stylesheet_directory_uri() . '/css/source/helpers/jquery.fancybox-thumbs.css');
}
add_action( 'wp_enqueue_scripts', 'blogmonstor_enqueue_style' );
function blogmonstor_enqueue_script() {
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
wp_enqueue_script('jquery','https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js','','',true);
wp_enqueue_script( 'bootstrap.min', get_stylesheet_directory_uri() . '/js/bootstrap.min.js');
wp_enqueue_script( 'jquery.flexslider', get_stylesheet_directory_uri() . '/js/jquery.flexslider-min.js');
wp_enqueue_script( 'custom', get_stylesheet_directory_uri() . '/js/modernizr.js');
wp_enqueue_script( 'jquery.fancybox.pack', get_stylesheet_directory_uri() . '/css/source/jquery.fancybox.pack.js?v=2.0.6');
wp_enqueue_script( 'jquery.fancybox-buttons', get_stylesheet_directory_uri() . '/css/source/helpers/jquery.fancybox-buttons.js');
wp_enqueue_script( 'jquery.fancybox-media', get_stylesheet_directory_uri() . '/css/source/helpers/jquery.fancybox-media.js');
wp_enqueue_script( 'jquery.fancybox-thumbs', get_stylesheet_directory_uri() . '/css/source/helpers/jquery.fancybox-thumbs.js');
}
add_action( 'wp_enqueue_scripts', 'blogmonstor_enqueue_script' );
// Remove Default Inline Shortcode CSS of WP Gallery
add_filter( 'use_default_gallery_style', '__return_false' );
// Adds RSS feed links to
for posts and comments.
add_theme_support( 'automatic-feed-links' );
// Adds RSS feed links to for posts and comments.
add_theme_support( 'html5', array( 'article', 'aside', 'details', 'figcaption', 'figure', 'footer', 'header', 'hgroup', 'main', 'nav', 'section', 'summary' ) );
// This theme uses post thumbnails
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150 ); // default Post Thumbnail dimensions
}
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'left-thumb', 300, 9999 ); //300 pixels wide (and unlimited height)
add_image_size( 'right-thumb', 300, 9999, true ); //(cropped)
add_image_size( 'center-thumb', 718, 500 ); // Unlimited Height Mode
add_image_size( 'thumb-small', 80, 80 ); // recent post thumb
}
// add post formet in theme
add_theme_support( 'post-formats', array( 'aside', 'video', 'gallery','quote','audio','status','link' ) );
// Set up the content width value based on the theme's design
if ( ! isset( $content_width ) ) $content_width = 710;
// Add Slideshare oEmbed
function add_oembed_slideshare(){
wp_oembed_add_provider( '#http://(www\.)?slideshare.net/*#i', 'http://www.slideshare.net/api/oembed/1', true );
}
add_action('init','add_oembed_slideshare');
//twiiter oembed
wp_oembed_add_provider(
'#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i',
'https://api.twitter.com/1/statuses/oembed.{format}?align=center',
true
);
//hide admin bar
add_filter('show_admin_bar', '__return_false');
// Regidter primary And secondary Menu
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'thememonstor' ),
'secondary' => __( 'Secondary Menu', 'thememonstor' ),
) );
/* Add responsive container to embeds
/* ------------------------------------ */
function blogmonstor_embed_html( $html ) {
return '' . $html . '
';
}
add_filter( 'embed_oembed_html', 'blogmonstor_embed_html', 10, 3 );
add_filter( 'video_embed_html', 'blogmonstor_embed_html' ); // Jetpack
// Get Video Embed
if ( ! function_exists( 'et_get_first_video' ) ) :
function et_get_first_video() {
$first_oembed = '';
$custom_fields = get_post_custom();
foreach ( $custom_fields as $key => $custom_field ) {
if ( 0 !== strpos( $key, '_oembed_' ) ) continue;
$first_oembed = $custom_field[0];
$video_width = (int) apply_filters( 'serene_video_width', 1280 );
$video_height = (int) apply_filters( 'serene_video_height', 540 );
$first_oembed = preg_replace( '/