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() ) ) : ?> '; echo ''; echo ''; echo ''; if ( of_get_option('meta_appid')) { echo ''; } if ( of_get_option('meta_fbadmins')) { echo ''; } if ( !has_post_thumbnail() ) { echo ''; } else { $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' ); echo ''; }} add_action( 'wp_head', 'insert_fb_in_head', 1 ); function insert_fb_in_cathead() { global $category ; if ( !is_category()) return; echo ''; echo ''; echo ''; if ( of_get_option('meta_defaultimage')) { echo ''; } if ( of_get_option('meta_appid')) { echo ''; } if ( of_get_option('meta_fbadmins')) { echo ''; }} add_action( 'wp_head', 'insert_fb_in_cathead', 1 ); function insert_fb_in_homehead() { global $home; if ( !is_home()) return; echo ''; echo ''; echo ''; echo ''; if ( of_get_option('meta_defaultimage')) { echo ''; } if ( of_get_option('meta_appid')) { echo ''; } if ( of_get_option('meta_fbadmins')) { echo ''; } if ( of_get_option('meta_description')) { echo ''; }} add_action( 'wp_head', 'insert_fb_in_homehead', 1 ); function insert_verifications() { if ( of_get_option('google_site_verification')) { echo ''; } if ( of_get_option('bing_site_verification')) { echo ''; } if ( of_get_option('yahoo_site_verification')) { echo ''; } if ( of_get_option('google_publisher')) { echo ''; } } add_action( 'wp_head', 'insert_verifications', 1 ); /* Register Widgets */ function avedon_widgets_init() { register_sidebar(array( 'name' => 'Home Full Feature Content', 'id' => 'home-fullfeature-content', 'description' => 'Above homepage content - 100% page width. (not recommended if using SuperSize)', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'name' => 'Home Feature Content', 'id' => 'home-feature-content', 'description' => 'Above homepage content - As wide as the content.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'name' => 'Top Content', 'id' => 'top-content', 'description' => 'Above content, below the menu.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); 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( 'init', 'avedon_widgets_init' ); /* Continue Link */ function avedon_excerpt($more) { global $post; return '...   Continue Reading'; } add_filter('excerpt_more', 'avedon_excerpt'); if ( ! function_exists( 'avedon_posted_on' ) ) : /* Print Meta */ function avedon_posted_on() { printf( __( '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; /* 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 (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('show_sharingarray') == "1") { wp_register_script( 'socialcount', get_template_directory_uri() .'/js/socialcount.js', array('jquery'), '1.0', true ); } if (of_get_option('invert_color') == "color-dark") { wp_enqueue_style( 'invert_dark', get_template_directory_uri() .'/css/dark.css', '1.0', true ); } } /* Custom Scripts */ add_action('avedontheme_custom_scripts', 'avedontheme_custom_scripts'); function avedontheme_custom_scripts() { ?>