__( 'Primary Navigation', 'fusion' ),
) );
}
add_action( 'after_setup_theme', 'fusion_setup' );
/**
* Enqueue scripts and styles
*/
function fusion_scripts() {
global $wp_styles;
wp_enqueue_style( 'fusion', get_stylesheet_uri() );
wp_enqueue_style( 'fusion-ie6', get_template_directory_uri() . '/ie6.css', array( 'fusion' ) );
$wp_styles->add_data( 'fusion-ie6', 'conditional', 'lte IE 6' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'fusion_scripts' );
function attachment_width() {
$options = fusion_get_theme_options();
$current_layout = $options['theme_layout'];
$flexible_layout = $options['flexible_layout'];
$two_columns = array( 'content-sidebar', 'sidebar-content' );
$no_columns = array( 'no-sidebar' );
$flexible = array( 'flexible' );
if ( in_array( $current_layout, $two_columns ) )
return 620;
elseif ( in_array( $current_layout, $no_columns ) )
return 958;
elseif ( in_array( $flexible_layout, $flexible ) )
return 0;
else
return 465;
}
function fusion_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'fusion_page_menu_args' );
function fusion_widgets_init() {
register_sidebar( array(
'name' => __( 'Primary Widget Area', 'fusion' ),
'id' => 'primary-widget-area',
'description' => __( 'The primary widget area', 'fusion' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
'
));
register_sidebar( array(
'name' => __( 'Secondary Widget Area', 'fusion' ),
'id' => 'secondary-widget-area',
'description' => __( 'The secondary widget area (only on 3-col pages)', 'fusion' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
'
));
register_sidebar( array(
'name' => __( 'Footer Widget Area', 'fusion' ),
'id' => 'footer-widget-area',
'description' => __( 'Footer widget area', 'fusion' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
'
));
}
add_action( 'widgets_init', 'fusion_widgets_init' );
function fusion_admin_header_style() {
?> 'full-post',
'theme_layout' => 'content-sidebar',
'flexible_layout' => 'fixed',
);
$options = get_option( 'fusion_theme_options', $defaults );
return $options;
}
/**
* Returns either Full Posts or Excerpts as selected in the theme options
*/
function fusion_current_post_length() {
$options = fusion_get_theme_options();
$post_length = $options[ 'post_length' ];
$excerpt_length = array( 'excerpt' );
if ( in_array( $post_length, $excerpt_length ) )
the_excerpt( __( 'Read the rest of this entry »', 'fusion' ) );
else
the_content( __( 'Read the rest of this entry »', 'fusion' ) );
}
/**
* Returns the current Fusion layout as selected in the theme options
*/
function fusion_current_layout() {
$options = fusion_get_theme_options();
$current_layout = $options[ 'theme_layout' ];
$two_columns = array( 'content-sidebar', 'sidebar-content' );
if ( in_array( $current_layout, $two_columns ) )
return 'two-column ' . $current_layout;
else
return 'three-column ' . $current_layout;
}
/**
* Adds fusion_current_layout() to the array of body classes
*/
function fusion_body_class($classes) {
$classes[] = fusion_current_layout();
return $classes;
}
add_filter( 'body_class', 'fusion_body_class' );
/**
* Returns the current Fusion layout width option
*/
function fusion_current_layout_width() {
$options = fusion_get_theme_options();
$current_layout = $options[ 'flexible_layout' ];
return $current_layout;
}
/**
* Adds fusion_current_layout_width() to the array of body classes
*/
function fusion_layout_options($classes) {
$classes[] = fusion_current_layout_width();
return $classes;
}
add_filter( 'body_class', 'fusion_layout_options' );
/**
* Lists Pings
*/
function list_pings( $comment, $args, $depth ) {
$GLOBALS[ 'comment' ] = $comment;
?>
id="comment-">
'commentbody', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply', 'fusion' ) ) ) ); ?>
is added by WordPress
/**
* Filters wp_title to print a neat tag based on what is being viewed.
*
* @since Fusion 3.1
*/
function fusion_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', 'fusion' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'fusion_wp_title', 10, 2 );
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/custom-header.php';
/**
* Load Jetpack compatibility file.
*/
if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) )
require get_template_directory() . '/inc/jetpack.php';
' . get_comment_author() . ''; else: $authorlink='' . get_comment_author() . ''; endif; printf( __( '%s by %s on %s', 'fusion' ), '#' . ++$commentcount . '', $authorlink, get_comment_time( get_option( 'date_format' ) ) . ' - ' . get_comment_time( get_option( 'time_format' ) ) ); ?>