__( 'Primary Navigation', 'brunelleschi' ), ) ); /* Default Header Stuff */ if ( ! defined( 'HEADER_TEXTCOLOR' ) ) { define( 'HEADER_TEXTCOLOR', '' ); } if ( ! defined( 'NO_HEADER_TEXT' ) ) { define( 'NO_HEADER_TEXT', true ); } add_option('brunelleschi_settings_sidebar','right'); } endif; /*---------------------------------------- # # REGISTER SCRIPTS # ----------------------------------------*/ /* Updated 6/27/11 */ /* Modernizr */ /* Contains Media Queries Used by 1140px Grid*/ wp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr-2.0.6.min.js', array(), '2.0.6' ); /*---------------------------------------- # # SETUP FUNCTIONS # ----------------------------------------*/ /* Title Function */ function brunelleschi_title(){ global $page, $paged; wp_title( '»', true, 'right' ); bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " » $site_description"; if ( $paged >= 2 || $page >= 2 ) echo ' » ' . sprintf( __( 'Page %s', 'brunelleschi' ), max( $paged, $page ) ); } /* Posted In Function */ function brunelleschi_posted_in() { $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'brunelleschi' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'brunelleschi' ); } else { $posted_in = __( 'Bookmark the permalink.', 'brunelleschi' ); } printf( $posted_in, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } /* Posted On Function */ function brunelleschi_posted_on() { printf( __(' %3$s Posted on %2$s', 'brunelleschi' ), 'meta-prep meta-prep-author', sprintf( '%3$s', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'brunelleschi' ), get_the_author() ), get_the_author() ) ); edit_post_link( __( 'Edit', 'brunelleschi' ), ' [', ']' ); } /* Theme Comments */ function brunelleschi_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
(.*?)#s", '', $css ); } if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) { add_filter( 'gallery_style', 'brunelleschi_remove_gallery_css' ); } /* Custom Excerpt More */ function brunelleschi_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= brunelleschi_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'brunelleschi_custom_excerpt_more' ); /* Show the Home Page */ function brunelleschi_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'brunelleschi_page_menu_args' ); /* Excerpt Length */ function brunelleschi_excerpt_length( $length ) { return 40; } add_filter( 'excerpt_length', 'brunelleschi_excerpt_length' ); /* Continue Reading Link */ function brunelleschi_continue_reading_link() { return ' ' . __( 'Continue reading ', 'brunelleschi' ) . ''; } /* Auto Excerpt More */ function brunelleschi_auto_excerpt_more( $more ) { return ' …' . brunelleschi_continue_reading_link(); } add_filter( 'excerpt_more', 'brunelleschi_auto_excerpt_more' ); /* Admin Header Style */ function brunelleschi_admin_header_style() { ?> 'start' ), array( 'type' => 'icon' ), array( 'type' => 'title', 'value' => 'Brunelleschi Theme Settings' ), array( 'type' => 'form-start' ), array( 'type' => 'section-start', 'heading' => 'Display Settings' ), array( 'type' => 'checkbox', 'name' => $settings_prefix . 'use-header-image', 'label' => 'Enable Header Image?', 'description' => 'Check to include a Header Image.', 'std' => '' ), array( 'type' => 'checkbox', 'name' => $settings_prefix . 'footer', 'label' => 'Disable Footer?', 'description' => 'Check to disable the footer.', 'std' => '' ), array( 'type' => 'select', 'name' => $settings_prefix . 'sidebar', 'label' => 'Left, Right, or No Sidebar?', 'description' => 'Pick which side you want the sidebar on. Choose none for no sidebar.', 'options' => array( 'left', 'right', 'none' ), 'std' => 'right' ), array( 'type' => 'select', 'name' => $settings_prefix . 'content-width', 'label' => 'Content Width:', 'description' => 'Choose the overall Content Width in pixels.', 'std' => 960, 'options' => array( 800, 960, 1024, 1140 ) ), array( 'type' => 'checkbox', 'name' => $settings_prefix . 'box-shadow', 'label' => 'Use box shadow?', 'description' => 'Check to add a groovy box shadow (new browsers only)', 'std' => '' ), array( 'type' => 'section-end' ), array( 'type' => 'form-end' ), array( 'type' => 'end' ) ); function brunelleschi_settings_render_fields() { global $settings_fields,$settings_prefix; foreach ( $settings_fields as $field ) { switch( $field['type'] ) { case 'start':?>