'start'
),
array(
'type' => 'icon'
),
array(
'type' => 'title',
'value' => 'Brunelleschi Theme Settings'
),
array(
'type' => 'form-start'
),
array(
'type' => 'section-start',
'heading' => 'Display Settings'
),
/* Disabled Until Header Image is Compatible with Full Width
array(
'type' => 'text',
'name' => $settings_prefix . 'content-width',
'label' => 'Set the content width',
'description' => 'IMPORTANT: Use CSS notation, that means include px or %. No less than 795px',
'std' => '960px'
),
*/
array(
'type' => 'checkbox',
'name' => $settings_prefix . 'use-header-image',
'label' => 'Enable Header Image?',
'description' => 'Check to include a Header Image.',
'std' => ''
),
array(
'type' => 'select',
'name' => $settings_prefix.'sidebar',
'label' => 'Left or Right Sidebar?',
'description' => 'Pick which side you want the sidebar on.',
'std' => 'right',
'options' => array(
'left',
'right'
)
),
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':?>
' . __( 'Settings saved.', 'brunelleschi') . '
'; ?>
|
|
|
|
|
/>
|
|
|
|
array(
'url' => '%s/images/headers/beach.png',
'thumbnail_url' => '%s/images/headers/beach-thumbnail.png',
'description' => __('Beach', 'brunelleschi')
)
) );
if ( ! function_exists( 'brunelleschi_admin_header_style' ) ) :
function brunelleschi_admin_header_style() {
?>
= 2 || $page >= 2 )
echo ' » ' . sprintf( __( 'Page %s', 'brunelleschi' ), max( $paged, $page ) );
}
/* enque_modernizer */
if ( !is_admin() ) { // instruction to only load if it is not the admin area
// register your script location, dependencies and version
wp_register_script('modernizr',
get_template_directory_uri() . '/js/modernizr-1.7.min.js',
array(),
'1.7' );
// enqueue the script
wp_enqueue_script('modernizr');
}
/* Run Brunelleschi Theme Setup */
add_action( 'after_setup_theme', 'brunelleschi_setup' );
/* brunelleschi setup */
if ( ! function_exists( 'brunelleschi_setup' ) ):
function brunelleschi_setup() {
add_editor_style();
add_custom_background();
add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );
add_theme_support( 'automatic-feed-links' );
load_theme_textdomain( 'brunelleschi', TEMPLATEPATH . '/languages' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
require_once( $locale_file );
register_nav_menus( array(
'primary' => __( 'Primary Navigation', 'brunelleschi' ),
) );
if ( ! defined( 'HEADER_TEXTCOLOR' ) )
define( 'HEADER_TEXTCOLOR', '' );
if ( ! defined( 'NO_HEADER_TEXT' ) )
define( 'NO_HEADER_TEXT', true );
}
endif;
/* 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' ) . '';
}
function brunelleschi_auto_excerpt_more( $more ) {
return ' …' . brunelleschi_continue_reading_link();
}
add_filter( 'excerpt_more', 'brunelleschi_auto_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' );
add_filter( 'use_default_gallery_style', '__return_false' );
function brunelleschi_remove_gallery_css( $css ) {
return preg_replace( "##s", '', $css );
}
if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) )
add_filter( 'gallery_style', 'brunelleschi_remove_gallery_css' );
if ( ! function_exists( 'brunelleschi_comment' ) ) :
function brunelleschi_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
id="li-comment-">
__( 'Primary Widget Area', 'brunelleschi' ),
'id' => 'primary-widget-area',
'description' => __( 'The primary widget area', 'brunelleschi' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
// Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
register_sidebar( array(
'name' => __( 'Secondary Widget Area', 'brunelleschi' ),
'id' => 'secondary-widget-area',
'description' => __( 'The secondary widget area', 'brunelleschi' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
// Area 3, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'First Footer Widget Area', 'brunelleschi' ),
'id' => 'first-footer-widget-area',
'description' => __( 'The first footer widget area', 'brunelleschi' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
// Area 4, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'Second Footer Widget Area', 'brunelleschi' ),
'id' => 'second-footer-widget-area',
'description' => __( 'The second footer widget area', 'brunelleschi' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
// Area 5, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'Third Footer Widget Area', 'brunelleschi' ),
'id' => 'third-footer-widget-area',
'description' => __( 'The third footer widget area', 'brunelleschi' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
// Area 6, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'Fourth Footer Widget Area', 'brunelleschi' ),
'id' => 'fourth-footer-widget-area',
'description' => __( 'The fourth footer widget area', 'brunelleschi' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'brunelleschi_widgets_init' );
function brunelleschi_remove_recent_comments_style() {
add_filter( 'show_recent_comments_widget_style', '__return_false' );
}
add_action( 'widgets_init', 'brunelleschi_remove_recent_comments_style' );
if ( ! function_exists( 'brunelleschi_posted_on' ) ) :
function brunelleschi_posted_on() {
printf( __('by %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( '%3$s',
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' ), ' [', ']' );
}
endif;
if ( ! function_exists( 'brunelleschi_posted_in' ) ) :
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' )
);
}
endif;