get( 'Version' );
if ( version_compare($the_theme_v, '1.3.9', ">=") ) {
$obsolete_files = array("/inc/carousel.php","/inc/featurettes.php","/inc/highlights.php","/inc/ga.php","/inc/home-bak.php","/inc/jumbo.php","/archive.php","/image.php","/attachment.php","/author.php","/search.php","/sidebar-sidebar2.php");
foreach ( $obsolete_files as $obsolete_file ) {
$theobsf = get_template_directory().$obsolete_file;
if(file_exists($theobsf) ) unlink($theobsf);
}
}
}
add_action('init','eo_del_obsolete_files');
//require_once('library/shortcodes.php'); Shortcodes are disabled since they fall into 'plugin territory'
//require_once('library/plugins.php'); // plugins & extra functions (optional)
// Set content width
if ( ! isset( $content_width ) ) $content_width = 580;
/**
* Creates a nicely formatted and more specific title element text
* for output in head of document, based on current view.
*
* @param string $title Default title text for current view.
* @param string $sep Optional separator.
*
* @return string Filtered title.
*
* @note may be called from http://example.com/wp-activate.php?key=xxx where the plugins are not loaded.
*/
function bones_filter_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() ) {
return $title;
}
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description";
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'bonestheme' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'bones_filter_title', 10, 2 );
/************* THUMBNAIL SIZE OPTIONS *************/
// Thumbnail sizes
add_image_size( 'eo-featurette', 350, 290, true );
add_image_size( 'eo-highlight', 140, 140, true);
add_image_size( 'eo-carousel', 970, 360, true);
/************* ACTIVE SIDEBARS ********************/
// Sidebars & Widgetizes Areas
function bones_register_sidebars() {
register_sidebar(array(
'id' => 'sidebar1',
'name' => 'Main Sidebar',
'description' => 'Used on every page.',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
));
register_sidebar(array(
'id' => 'sidebar-2',
'name' => 'Home Sidebar',
'description' => 'Front page only.',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
register_sidebar(array(
'id' => 'footer1',
'name' => 'Footer 1',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
register_sidebar(array(
'id' => 'footer2',
'name' => 'Footer 2',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
register_sidebar(array(
'id' => 'footer3',
'name' => 'Footer 3',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
/*
to add more sidebars or widgetized areas, just copy
and edit the above sidebar code. In order to call
your new sidebar just use the following code:
Just change the name to whatever your new
sidebar's id is, for example:
To call the sidebar in your template, you can just copy
the sidebar.php file and rename it to your sidebar's name.
So using the above example, it would be:
sidebar-sidebar2.php
*/
} // don't remove this bracket!
/************* COMMENT LAYOUT *********************/
// Comment Layout
function bones_comments($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
>