// Image gallery thumbs } #-----------------------------------------------------------------# # Post formats and Widgets #-----------------------------------------------------------------# add_theme_support('post-formats', array('video', 'gallery', 'link', 'quote', 'audio')); /* Register widgetized locations */ if (function_exists('register_sidebar')) { register_sidebar(array('name' => 'Blog Sidebar', 'id' => 'blog-sidebar', 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); register_sidebar(array('name' => 'Woocommerce Sidebar', 'id' => 'woocommerce-sidebar', 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); register_sidebar(array('name' => 'Sidebar 1', 'id' => 'sidebar1', 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); register_sidebar(array('name' => 'Sidebar 2', 'id' => 'sidebar2', 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); register_sidebar(array('name' => 'Sidebar 3', 'id' => 'sidebar3', 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); register_sidebar(array('name' => 'Sidebar 4', 'id' => 'sidebar4', 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); register_sidebar(array('name' => 'Footer Widgets Area1', 'id' => 'footer-widgets', 'description' => __('These are widgets for the Footer Area 1.', 'brad-framework'), 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s ' . brad_get_class_name($brad_data['footer_columns']) . '">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); register_sidebar(array('name' => 'Footer Widgets Area2', 'id' => 'footer-widgets2', 'description' => __('These are widgets for the Footer Area.', 'brad-framework'), 'before_widget' => '<div id="%1$s" class="widget widget_meta %2$s ' . brad_get_class_name($brad_data['footer_columns2']) . '">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>')); } /*-------------------------------------------------------------------------------------------------- All the small fixers for theme --------------------------------------------------------------------------------------------------*/ add_filter('the_content_more_link', 'modify_read_more_link'); function modify_read_more_link() { global $show_readmore; $show_readmore = 1; return; } add_filter('the_content', 'brad_content_filter'); add_filter('widget_text', 'brad_content_filter'); function brad_content_filter($content) {
$el_class1 = ''; $el_class2 = brad_getCSSAnimation($css_animation); } $i = 1; while ($testimonials->have_posts()) { $testimonial_class = 'span12'; $ex_class5 = ''; $testimonials->the_post(); $person = get_post_meta($post->ID, 'brad_testimonial_name', true); $company = get_post_meta($post->ID, 'brad_testimonial_company', true); $person_role = get_post_meta($post->ID, 'brad_testimonial_role', true); $company_link = get_post_meta($post->ID, 'brad_testimonial_company_link', true); $testm_width = get_post_meta($post->ID, 'brad_testm_width', true); $img_src = ''; if ($appearance != 'carousel') { $testimonial_class = !empty($testm_width) && $masonry == 'yes' ? $testm_width : brad_get_class_name($columns); } $testimonial_content = get_the_content($post->ID); $img_id = preg_replace('/[^\\d]/', '', get_post_meta(get_the_ID(), 'brad_testimonial_image', true)); $return .= '<div class="testimonial-item ' . $testimonial_class . ' img-align-' . $img_loc . '"><div class="inner-content ' . $el_class2 . '" data-animation-delay="' . intval($i * $css_animation_delay) . '" data-animation-effect="' . $css_animation . '"><div class="testimonial animated-box ">'; if ($img_id != '') { $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => 'thumbnail')); if ($img == NULL) { $img['thumbnail'] = '<img src="http://placekitten.com/g/400/300" /> <small>' . __('This is image placeholder, edit your page to replace it.', "brad-framework") . '</small>'; } $img_src = '<div class="author-avatar ' . $el_class1 . '" data-animation-delay="' . intval($i * $css_animation_delay) . '" data-animation-effect="' . $css_animation . '">' . $img['thumbnail'] . '</div>'; $ex_class5 = ' with-image'; } if ($img_loc == 'left') { $return .= $img_src; }
<?php global $brad_data, $brad_includes, $brad_love, $post; $bgimage = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); $bgcolor = get_post_meta($post->ID, 'brad_quote-overlay-bg', true); $bgopacity = get_post_meta($post->ID, 'brad_quote-overlay-opacity', true); if ($bgcolor != '') { $rgb = brad_hex2rgb($bgcolor); $rgba = "rgba({$rgb[0]},{$rgb[1]},{$rgb[2]},{$bgopacity})"; $bgstyle = "background-color:{$rgba}"; } else { $bgstyle = ""; } $class = brad_get_class_name($brad_data['grid_blog_columns']); $img_type = brad_get_img_size($brad_data['grid_blog_columns'], $brad_data['blog_masonry']); ?> <li id="post-<?php the_ID(); ?> " <?php post_class(' post-grid-item post-blockquote bg-style-' . $brad_data['grid_blog_style'] . ' scheme-' . get_post_meta($post->ID, 'brad_quote-scheme', true) . ' ' . $class); ?> > <div class="inner-content"> <div class="post-blockquote-image" style="background-image:url(<?php echo $bgimage; ?> )"></div> <div class="post-blockquote-image-overlay" style="<?php echo $bgstyle;