Source

elbee-elgee / includes / functions / supports.php

Full commit
<?php
/**
 * This file is responsible for registering all the extra core
 * WordPress functionality the theme supports.
 *
 * @package     Elbee-Elgee
 * @copyright   Copyright (c) 2011, Doug Stewart
 * @license     http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License, v2 (or newer)
 *
 * @since       Elbee-Elgee 1.0
 *
 */
/**
 * Register all the sidebar areas
 */
function lblg_register_sidebars() {
	register_sidebar( array( 'name'=>'Primary',
						   'before_widget' => '<li id="%1$s" class="widget %2$s">', 
						   'after_widget' => '</li>', 
						   'before_title' => '<h4>', 
						   'after_title' => '</h4>' ) );
	register_sidebar( array( 'name'=>'Secondary', 
						   'before_widget' => '<li id="%1$s" class="widget %2$s">',
						   'after_widget' => '</li>', 
						   'before_title' => '<h4>', 
						   'after_title' => '</h4>' ) );
	register_sidebar( array( 'name'=>'Bottom-Left',
						   'before_widget' => '<li id="%1$s" class="widget %2$s">',
						   'after_widget' => '</li>', 
						   'before_title' => '<h4>', 
						   'after_title' => '</h4>' ) );
	register_sidebar( array( 'name'=>'Bottom-Right',
						   'before_widget' => '<li id="%1$s" class="widget %2$s">',
						   'after_widget' => '</li>', 
						   'before_title' => '<h4>', 
						   'after_title' => '</h4>' ) );
}
add_action( 'widgets_init', 'lblg_register_sidebars' );

/*
* Add support for various WordPress-native functionality
*/
// Set $content_width 
if ( ! isset( $content_width ) ) $content_width = '600';

// Set up supported post formats
$lblg_post_formats = apply_filter( 'lblg_post_formats',
									array( 	'aside',
											'chat',
											'gallery',
											'image',
											'link',
											'quote',
											'status',
											'video',
											'audio' ) );
add_theme_support( 'post-formats', $lblg_post_formats );
add_theme_support( 'nav-menus' );
add_theme_support( 'custom-background' );
add_theme_support( 'buddypress' );
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 64, 64, true );
add_image_size( 'lb-content-header', $content_width, 9999 );
add_theme_support( 'automatic-feed-links' );
//add_custom_background();
add_editor_style();

/**
 * Register nav menus
*/
register_nav_menu( 'primary', 'Primary Navigation Menu' );
if( function_exists( 'bp_get_loggedin_user_nav' ) ) {
	register_nav_menu( 'lblgbpmenu', 'Default BuddyPress Menu' );
}
if( $lblg_options['enable_mobile_menu'] ) {
	register_nav_menu( 'lblgmobilemenu', 'Mobile Nav Menu' );
	add_action( 'lblg_before_container', 'lblg_output_mobile_nav' );
}