'. "\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( '//','', $first_oembed ); $first_oembed = preg_replace( "/width=\"[0-9]*\"/", "width={$video_width}", $first_oembed ); $first_oembed = preg_replace( "/height=\"[0-9]*\"/", "height={$video_height}", $first_oembed ); break; } return ( '' !== $first_oembed ) ? $first_oembed : false; } endif; // Gallery Post Format if ( ! function_exists( 'serene_gallery_images' ) ) : function bm_gallery_images() { $output = $images_ids = ''; if ( function_exists( 'get_post_galleries' ) ) { $galleries = get_post_galleries( get_the_ID(), false ); if ( empty( $galleries ) ) return false; if ( isset( $galleries[0]['ids'] ) ) { foreach ( $galleries as $gallery ) { // Grabs all attachments ids from one or multiple galleries in the post $images_ids .= ( '' !== $images_ids ? ',' : '' ) . $gallery['ids']; } $attachments_ids = explode( ',', $images_ids ); // Removes duplicate attachments ids $attachments_ids = array_unique( $attachments_ids ); } else { $attachments_ids = get_posts( array( 'fields' => 'ids', 'numberposts' => 999, 'order' => 'ASC', 'orderby' => 'menu_order', 'post_mime_type' => 'image', 'post_parent' => get_the_ID(), 'post_type' => 'attachment', ) ); } } else { $pattern = get_shortcode_regex(); preg_match( "/$pattern/s", get_the_content(), $match ); $atts = shortcode_parse_atts( $match[3] ); if ( isset( $atts['ids'] ) ) $attachments_ids = explode( ',', $atts['ids'] ); else return false; } echo '
'; echo ' '; echo '
'; ?> %s ', get_permalink( get_the_ID() ), esc_html__( 'More', 'thememonstor' ) ); } add_filter( 'excerpt_more', 'thememonstor_excerpt_more' ); /* SEO Supported Title /* ------------------------------------ */ function blogmonstor_wp_title( $title ) { // Do not filter for RSS feed / if SEO plugin installed if ( is_feed() || class_exists('All_in_One_SEO_Pack') || class_exists('HeadSpace_Plugin') || class_exists('Platinum_SEO_Pack') || class_exists('wpSEO') || defined('WPSEO_VERSION') ) return $title; if ( is_front_page() ) { $title = bloginfo('name'); echo ' - '; bloginfo('description'); } if ( !is_front_page() ) { $title.= ''.' - '.''.get_bloginfo('name'); } return $title; } add_filter( 'wp_title', 'blogmonstor_wp_title' ); /* Thumbnail upscale /* ------------------------------------ */ function blogmonstor_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){ if ( !$crop ) return null; // let the wordpress default function handle this $aspect_ratio = $orig_w / $orig_h; $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); $crop_w = round($new_w / $size_ratio); $crop_h = round($new_h / $size_ratio); $s_x = floor( ($orig_w - $crop_w) / 2 ); $s_y = floor( ($orig_h - $crop_h) / 2 ); return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h ); } add_filter( 'image_resize_dimensions', 'alx_thumbnail_upscale', 10, 6 ); // function bm_add_viewport_meta() { echo ''; } add_action( 'wp_head', 'bm_add_viewport_meta' ); if (function_exists('register_sidebar')) { register_sidebar( array( 'name' => 'Right Sidebar', 'id' => 'sidebar-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'class' => '' )); register_sidebar(array( 'name' => 'Footer Left', 'id' => 'footer-left-widget', 'description' => 'Left Footer widget position.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Footer Center', 'id' => 'footer-center-widget', 'description' => 'Centre Footer widget position.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Footer Right', 'id' => 'footer-right-widget', 'description' => 'Right Footer widget position.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); } // Add SoundCloud oEmbed function add_oembed_soundcloud(){ wp_oembed_add_provider('#https?://(?:api.)?soundcloud.com/.*#i', 'http://soundcloud.com/oembed', true); } add_action('init','add_oembed_soundcloud'); // Tag Clouds function https://github.com/daneden/animate.css - http://jschr.github.io/textillate/ - http://www.scrollrevealjs.org/ add_filter('widget_tag_cloud_args','set_number_tags'); function set_number_tags($args) { $args = array('number' => 25, 'orderby' => 'count','smallest' => 10, 'largest' => 10, 'separator' => ' '); //$args['format'] = 'list'; return $args; } function bg_meta_head(){?>
', 'thememonstor'); ?>    ', 'thememonstor'); ?>  name ) ) . '">'.$category->cat_name.''.$separator; $i++; } echo trim($output, $separator); } ?>   ', 'thememonstor'); ?>    (0)', 'thememonstor'), __('  (1)', 'thememonstor'), __('  (%)', 'thememonstor')); ?>
', 'thememonstor'); ?>    (0)', 'thememonstor'), __('  (1)', 'thememonstor'), __('  (%)', 'thememonstor')); ?>
comment_type ) : case 'pingback' : case 'trackback' : ?>
  • id="li-comment-">
    says:', 'thememonstor' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    '
    ' . ' ' . '
    ', 'email' => '
    ' . '
    ', 'url' => '
    ' . '
    ', ); return $fields; } //change the comments Textarea add_filter( 'comment_form_defaults', 'thememonstor_comment_form' ); function thememonstor_comment_form( $args ) { $args['comment_field'] = '
    '; return $args; } //change the comments Submit Button add_action('comment_form', 'thememonstor_comment_button' ); function thememonstor_comment_button() { echo ''; } //Remove comment form HTML tags and attributes function genesischild_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } add_filter( 'comment_form_defaults', 'genesischild_remove_comment_form_allowed_tags' ); //change the comments header function genesischild_comment_form_defaults( $defaults ) { $defaults['title_reply'] = __( 'Leave a Comment','thememonstor' ); return $defaults; } add_filter( 'comment_form_defaults', 'genesischild_comment_form_defaults' ); // Related Post For Single Post function bg_related_post() {?>

    Related posts

    ID); if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id; $args=array( 'tag__in' => $tag_ids, 'post__not_in' => array($post->ID), 'posts_per_page'=>$post_count, // Number of related posts to display. 'ignore_sticky_posts'=>1 ); $my_query = new wp_query( $args ); while( $my_query->have_posts() ) { $my_query->the_post(); ?>
    has_children ) //{ // // $atts['data-toggle'] = 'tab'; // $atts['class'] = 'dropdown-toggle'; // //} // return $atts; //}, 10, 3); //class My_Custom_Nav_Walker extends Walker_Nav_Menu { // // function start_lvl(&$output, $depth = 0, $args = array()) { // $output .= "\n