'0a0a0a',
'border' => '191919',
'text' => 'cccccc',
'link' => '666666',
'url' => 'de7c00',
);
$content_width = 450;
function sunburn_body_classes( $classes ) {
// Remove body classes that conflict with legacy CSS
$classes = array_merge( array_diff( $classes, array( 'page' ) ) );
return $classes;
}
add_filter( 'body_class', 'sunburn_body_classes' );
add_theme_support( 'automatic-feed-links' );
if ( function_exists('register_sidebar') )
register_sidebar();
/*
Plugin Name: Nice Categories
Plugin URI: http://txfx.net/2004/07/22/wordpress-conversational-categories/
Description: Displays the categories conversationally, like: Category1, Category2 and Category3
Version: 1.5.1
Author: Mark Jaquith
Author URI: http://txfx.net/
*/
function the_nice_category($normal_separator = ', ', $penultimate_separator = ' and ') {
$categories = get_the_category();
if (empty($categories)) {
_e('Uncategorized');
return;
}
$thelist = '';
$i = 1;
$n = is_countable( $categories ) ? count( $categories ) : 0;
foreach ($categories as $category) {
$category->cat_name = $category->cat_name;
if (1 < $i && $i != $n) $thelist .= $normal_separator;
if (1 < $i && $i == $n) $thelist .= $penultimate_separator;
$thelist .= 'cat_name) . '">'.$category->cat_name.'';
++$i;
}
echo apply_filters('the_category', $thelist, $normal_separator);
}
// Custom comments
function sunburn_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
?>
id="comment-">
tag based on what is being viewed.
*
* @since Sunburn 1.1
*/
function sunburn_wp_title( $title, $sep ) {
global $page, $paged;
if ( is_feed() )
return $title;
// Add the blog name
$title .= get_bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title .= " $sep $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
$title .= " $sep " . sprintf( __( 'Page %s', 'sunburn' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'sunburn_wp_title', 10, 2 );
/**
* WP.com: Show a nice admin message noting that the current theme has been
* trumped by a newer one.
*/
function sunburn_add_notice() {
$current_theme = wp_get_theme()->Name;
if ( ! get_user_meta( get_current_user_id(), "$current_theme-theme-update", true ) ) {
add_settings_error(
'theme-update',
'theme-update',
sprintf(
__( 'Howdy! Your current theme, %1$s, has seen an update in the form of a brand new theme, %2$s. For more information, check out our blog post introducing %2$s to the world. %5$s' ),
$current_theme, // Old theme
'Sunspot', // New theme
admin_url( 'themes.php?s=sunspot' ), // Link to new theme
esc_url( 'http://en.blog.wordpress.com/2012/03/08/new-themes-sunspot-and-triton-lite/' ), // Link to announcement post
sprintf( '×', __( 'Dismiss' ) ) // Dismiss
),
'updated'
);
remove_action( 'admin_notices', 'show_tip' );
if ( ! has_filter( 'admin_notices', 'settings_errors' ) )
add_action( 'admin_notices', 'settings_errors' );
wp_enqueue_script( 'dismiss-theme-update', get_template_directory_uri() . '/js/dismiss-theme-update.js', array( 'jquery' ), 20130225 );
wp_localize_script( 'dismiss-theme-update', 'dismissThemeUpdate', array(
'theme' => $current_theme,
'nonce' => wp_create_nonce( "$current_theme-theme-update" ),
) );
}
}
add_action( 'admin_init', 'sunburn_add_notice' );
/**
* Updates user setting when theme update notice was dismissed.
*/
function sunburn_dismiss_theme_update() {
$current_theme = wp_get_theme()->Name;
check_ajax_referer( "$current_theme-theme-update", 'nonce' );
if ( $_REQUEST['theme'] == $current_theme ) {
update_user_meta( get_current_user_id(), "$current_theme-theme-update", true );
wp_die( 1 );
}
}
add_action( 'wp_ajax_dismiss_theme_update', 'sunburn_dismiss_theme_update' );