Posted on by ', 'avedon' ), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'avedon' ), get_the_author() ) ), esc_html( get_the_author() ) ); } endif; if ( ! function_exists( 'avedon_content_nav' ) ): /* Next / Previous */ function avedon_content_nav( $nav_id ) { global $wp_query; ?> max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : ?> '; } add_action( 'wp_head', 'avedon_favicons', 1 ); /* Register Widgets */ function avedon_widgets_init() { register_sidebar(array( 'name' => 'Home Sidebar', 'id' => 'home-right', 'description' => 'Right sidebar on homepage', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar( array( 'name' => 'Page Sidebar', 'id' => 'sidebar-page', 'before_widget' => '
', 'after_widget' => "
", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => 'Posts Sidebar', 'id' => 'sidebar-posts', 'before_widget' => '
', 'after_widget' => "
", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar(array( 'name' => 'Call to Action', 'id' => 'pitch-content', 'description' => 'Under content, over middle - Best used for call to action..', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
' )); register_sidebar(array( 'name' => 'Middle Content', 'id' => 'bottom-content', 'description' => 'Below content, above the footer.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Bottom Left', 'id' => 'bottom-left', 'description' => 'Bottom left widget box.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Bottom Middle', 'id' => 'bottom-middle', 'description' => 'Bottom middle widget box.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Bottom Right', 'id' => 'bottom-right', 'description' => 'Bottom right widget box.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Footer Content', 'id' => 'footer-content', 'description' => 'Footer text or acknowledgements', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); } add_action( 'widgets_init', 'avedon_widgets_init' ); if ( ! function_exists( 'avedon_content_nav' ) ) : /** * Displays navigation to next/previous pages when applicable. * * @since Twenty Twelve 1.0 */ function avedon_content_nav( $html_id ) { global $wp_query; $html_id = esc_attr( $html_id ); if ( $wp_query->max_num_pages > 1 ) : ?> ID) . '" class="btn btn-small">Continue Reading'; } add_filter('excerpt_more', 'avedon_excerpt'); /* Body Classes */ function avedon_body_classes( $classes ) { // Adds a class of single-author to blogs with only 1 published author if ( ! is_multi_author() ) { $classes[] = 'single-author'; } return $classes; } add_filter( 'body_class', 'avedon_body_classes' ); /* Multi Category - via http://bootstrapwp.rachelbaker.me */ function avedon_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) { // Create an array of all the categories that are attached to posts $all_the_cool_cats = get_categories( array( 'hide_empty' => 1, ) ); // Count the number of categories that are attached to the posts $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'all_the_cool_cats', $all_the_cool_cats ); } if ( '1' != $all_the_cool_cats ) { // This blog has more than 1 category so bootstrap_categorized_blog should return true return true; } else { // This blog has only 1 category so bootstrap_categorized_blog should return false return false; } } /* Flush Transients - via http://bootstrapwp.rachelbaker.me */ function avedon_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'all_the_cool_cats' ); } add_action( 'edit_category', 'avedon_category_transient_flusher' ); add_action( 'save_post', 'avedon_category_transient_flusher' ); function avedon_enhanced_image_navigation( $url ) { global $post; if ( wp_attachment_is_image( $post->ID ) ) $url = $url . '#main'; return $url; } add_filter( 'attachment_link', 'avedon_enhanced_image_navigation' ); /* Check for Post Thumb */ function avedon_post_thumbnail_check() { global $post; if (get_the_post_thumbnail()) { return true; } else { return false; } } /* Add Breadcrumbs */ function avedon_breadcrumbs() { $delimiter = '
  • /
  • '; $home = 'Home'; // text for the 'Home' link $before = '
  • '; // tag before the current crumb $after = '
  • '; // tag after the current crumb if ( !is_home() && !is_front_page() || is_paged() ) { echo ''; } } add_action( 'wp_enqueue_scripts', 'avedon_load_js_files' ); function avedon_load_js_files() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); if (of_get_option('include_fullbootjava') == "1") { wp_register_script( 'bootstrap', get_template_directory_uri() .'/js/bootstrap.js', array('jquery'), '1.0', true ); wp_enqueue_script( 'bootstrap' ); } else { wp_register_script( 'fullbootjava', get_template_directory_uri() .'/js/bootstrap-dropdown.js', array('jquery'), '1.0', true ); wp_enqueue_script( 'fullbootjava' ); } if (of_get_option('show_supersize') ) { wp_register_script( 'jqueryeasing', get_template_directory_uri() .'/js/jquery.easing.min.js', array('jquery'), '1.0', true ); wp_register_script( 'supersized', get_template_directory_uri() .'/js/supersized.3.2.7.js', '1.0', true ); wp_register_script( 'supersizedshutter', get_template_directory_uri() .'/js/supersized.shutter.js', '1.0', true ); wp_register_style( 'supercss', get_template_directory_uri() .'/css/supersized.css', '1.0', true ); wp_enqueue_script( 'jqueryeasing' ); wp_enqueue_script( 'supersized' ); wp_enqueue_script( 'supersizedshutter' ); wp_enqueue_style( 'supercss' ); } if (of_get_option('invert_color') == "color-dark") { wp_enqueue_style( 'invert_dark', get_template_directory_uri() .'/css/dark.css', '1.0', true ); } } function avedon_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; $title .= get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'avedon' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'avedon_wp_title', 10, 2 );