'medium', ), $atts ); $out['size'] = $atts['size']; return $out; } add_filter( 'shortcode_atts_gallery', 'accelerate_gallery_atts', 10, 3 ); /****************************************************************************************/ add_filter( 'body_class', 'accelerate_body_class' ); /** * Filter the body_class * * Throwing different body class for the different layouts in the body tag */ function accelerate_body_class( $classes ) { global $post; if( $post ) { $layout_meta = get_post_meta( $post->ID, 'accelerate_page_layout', true ); } if( is_home() ) { $queried_id = get_option( 'page_for_posts' ); $layout_meta = get_post_meta( $queried_id, 'accelerate_page_layout', true ); } if( empty( $layout_meta ) || is_archive() || is_search() ) { $layout_meta = 'default_layout'; } $accelerate_default_layout = of_get_option( 'accelerate_default_layout', 'right_sidebar' ); $accelerate_default_page_layout = of_get_option( 'accelerate_pages_default_layout', 'right_sidebar' ); $accelerate_default_post_layout = of_get_option( 'accelerate_single_posts_default_layout', 'right_sidebar' ); if( $layout_meta == 'default_layout' ) { if( is_page() ) { if( $accelerate_default_page_layout == 'right_sidebar' ) { $classes[] = ''; } elseif( $accelerate_default_page_layout == 'left_sidebar' ) { $classes[] = 'left-sidebar'; } elseif( $accelerate_default_page_layout == 'no_sidebar_full_width' ) { $classes[] = 'no-sidebar-full-width'; } elseif( $accelerate_default_page_layout == 'no_sidebar_content_centered' ) { $classes[] = 'no-sidebar'; } } elseif( is_single() ) { if( $accelerate_default_post_layout == 'right_sidebar' ) { $classes[] = ''; } elseif( $accelerate_default_post_layout == 'left_sidebar' ) { $classes[] = 'left-sidebar'; } elseif( $accelerate_default_post_layout == 'no_sidebar_full_width' ) { $classes[] = 'no-sidebar-full-width'; } elseif( $accelerate_default_post_layout == 'no_sidebar_content_centered' ) { $classes[] = 'no-sidebar'; } } elseif( $accelerate_default_layout == 'right_sidebar' ) { $classes[] = ''; } elseif( $accelerate_default_layout == 'left_sidebar' ) { $classes[] = 'left-sidebar'; } elseif( $accelerate_default_layout == 'no_sidebar_full_width' ) { $classes[] = 'no-sidebar-full-width'; } elseif( $accelerate_default_layout == 'no_sidebar_content_centered' ) { $classes[] = 'no-sidebar'; } } elseif( $layout_meta == 'right_sidebar' ) { $classes[] = ''; } elseif( $layout_meta == 'left_sidebar' ) { $classes[] = 'left-sidebar'; } elseif( $layout_meta == 'no_sidebar_full_width' ) { $classes[] = 'no-sidebar-full-width'; } elseif( $layout_meta == 'no_sidebar_content_centered' ) { $classes[] = 'no-sidebar'; } if ( of_get_option( 'accelerate_posts_page_display_type', 'large_image' ) == 'small_image' ) { $classes[] = 'blog-small'; } if ( of_get_option( 'accelerate_posts_page_display_type', 'large_image' ) == 'small_image_alternate' ) { $classes[] = 'blog-alternate-small'; } if( of_get_option( 'accelerate_site_layout', 'wide' ) == 'wide' ) { $classes[] = 'wide'; } elseif( of_get_option( 'accelerate_site_layout', 'wide' ) == 'box' ) { $classes[] = ''; } return $classes; } /****************************************************************************************/ if ( ! function_exists( 'accelerate_sidebar_select' ) ) : /** * Fucntion to select the sidebar */ function accelerate_sidebar_select() { global $post; if( $post ) { $layout_meta = get_post_meta( $post->ID, 'accelerate_page_layout', true ); } if( is_home() ) { $queried_id = get_option( 'page_for_posts' ); $layout_meta = get_post_meta( $queried_id, 'accelerate_page_layout', true ); } if( empty( $layout_meta ) || is_archive() || is_search() ) { $layout_meta = 'default_layout'; } $accelerate_default_layout = of_get_option( 'accelerate_default_layout', 'right_sidebar' ); $accelerate_default_page_layout = of_get_option( 'accelerate_pages_default_layout', 'right_sidebar' ); $accelerate_default_post_layout = of_get_option( 'accelerate_single_posts_default_layout', 'right_sidebar' ); if( $layout_meta == 'default_layout' ) { if( is_page() ) { if( $accelerate_default_page_layout == 'right_sidebar' ) { get_sidebar(); } elseif ( $accelerate_default_page_layout == 'left_sidebar' ) { get_sidebar( 'left' ); } } if( is_single() ) { if( $accelerate_default_post_layout == 'right_sidebar' ) { get_sidebar(); } elseif ( $accelerate_default_post_layout == 'left_sidebar' ) { get_sidebar( 'left' ); } } elseif( $accelerate_default_layout == 'right_sidebar' ) { get_sidebar(); } elseif ( $accelerate_default_layout == 'left_sidebar' ) { get_sidebar( 'left' ); } } elseif( $layout_meta == 'right_sidebar' ) { get_sidebar(); } elseif( $layout_meta == 'left_sidebar' ) { get_sidebar( 'left' ); } } endif; /****************************************************************************************/ if ( ! function_exists( 'accelerate_posts_listing_display_type_select' ) ) : /** * Function to select the posts listing display type */ function accelerate_posts_listing_display_type_select() { if ( of_get_option( 'accelerate_posts_page_display_type', 'large_image' ) == 'large_image' ) { $format = 'blog-large-image'; } elseif ( of_get_option( 'accelerate_posts_page_display_type', 'large_image' ) == 'small_image' ) { $format = 'blog-small-image'; } elseif ( of_get_option( 'accelerate_posts_page_display_type', 'large_image' ) == 'small_image_alternate' ) { $format = 'blog-small-image'; } else { $format = get_post_format(); } return $format; } endif; /****************************************************************************************/ if ( ! function_exists( 'accelerate_entry_meta' ) ) : function accelerate_entry_meta() { echo '
'; } endif; /****************************************************************************************/ add_action( 'admin_head', 'accelerate_favicon' ); add_action( 'wp_head', 'accelerate_favicon' ); /** * Fav icon for the site */ function accelerate_favicon() { if ( of_get_option( 'accelerate_activate_favicon', '0' ) == '1' ) { $accelerate_favicon = of_get_option( 'accelerate_favicon', '' ); $accelerate_favicon_output = ''; if ( !empty( $accelerate_favicon ) ) { $accelerate_favicon_output .= ''; } echo $accelerate_favicon_output; } } /****************************************************************************************/ add_action('wp_head', 'accelerate_custom_css'); /** * Hooks the Custom Internal CSS to head section */ function accelerate_custom_css() { $accelerate_internal_css = ''; $primary_color = of_get_option( 'accelerate_primary_color', '#77CC6D' ); if( $primary_color != '#77CC6D' ) { $accelerate_internal_css .= ' .accelerate-button,blockquote,button,input[type=button],input[type=reset],input[type=submit]{background-color:'.$primary_color.'}a{color:'.$primary_color.'}#page{border-top:3px solid '.$primary_color.'}#site-title a:hover{color:'.$primary_color.'}#search-form span,.main-navigation a:hover,.main-navigation ul li ul li a:hover,.main-navigation ul li ul li:hover>a,.main-navigation ul li.current-menu-ancestor a,.main-navigation ul li.current-menu-item a,.main-navigation ul li.current-menu-item ul li a:hover,.main-navigation ul li.current_page_ancestor a,.main-navigation ul li.current_page_item a,.main-navigation ul li:hover>a{background-color:'.$primary_color.'}.site-header .menu-toggle:before{color:'.$primary_color.'}.main-small-navigation li:hover{background-color:'.$primary_color.'}.main-small-navigation ul>.current-menu-item,.main-small-navigation ul>.current_page_item{background:'.$primary_color.'}.footer-menu a:hover,.footer-menu ul li.current-menu-ancestor a,.footer-menu ul li.current-menu-item a,.footer-menu ul li.current_page_ancestor a,.footer-menu ul li.current_page_item a,.footer-menu ul li:hover>a{color:'.$primary_color.'}#featured-slider .slider-read-more-button,.slider-title-head .entry-title a{background-color:'.$primary_color.'}a.slide-prev,a.slide-next,.slider-title-head .entry-title a{background-color:'.$primary_color.'}#controllers a.active,#controllers a:hover{background-color:'.$primary_color.';color:'.$primary_color.'}.format-link .entry-content a{background-color:'.$primary_color.'}#secondary .widget_featured_single_post h3.widget-title a:hover,.widget_image_service_block .entry-title a:hover{color:'.$primary_color.'}.pagination span{background-color:'.$primary_color.'}.pagination a span:hover{color:'.$primary_color.';border-color:'.$primary_color.'}#content .comments-area a.comment-edit-link:hover,#content .comments-area a.comment-permalink:hover,#content .comments-area article header cite a:hover,.comments-area .comment-author-link a:hover{color:'.$primary_color.'}.comments-area .comment-author-link span{background-color:'.$primary_color.'}#wp-calendar #today,.comment .comment-reply-link:hover,.nav-next a,.nav-previous a{color:'.$primary_color.'}.widget-title span{border-bottom:2px solid '.$primary_color.'}#secondary h3 span:before,.footer-widgets-area h3 span:before{color:'.$primary_color.'}#secondary .accelerate_tagcloud_widget a:hover,.footer-widgets-area .accelerate_tagcloud_widget a:hover{background-color:'.$primary_color.'}.footer-widgets-area a:hover{color:'.$primary_color.'}.footer-socket-wrapper{border-top:3px solid '.$primary_color.'}.footer-socket-wrapper .copyright a:hover{color:'.$primary_color.'}a#scroll-up{background-color:'.$primary_color.'}.entry-meta .byline i,.entry-meta .cat-links i,.entry-meta a,.post .entry-title a:hover{color:'.$primary_color.'}.entry-meta .post-format i{background-color:'.$primary_color.'}.entry-meta .comments-link a:hover,.entry-meta .edit-link a:hover,.entry-meta .posted-on a:hover,.entry-meta .tag-links a:hover{color:'.$primary_color.'}.more-link span,.read-more{background-color:'.$primary_color.'}'; } if( !empty( $accelerate_internal_css ) ) { ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; } // Don't print empty markup in archives if there's only one page. if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) return; $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; ?> comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>', '' ); ?>