__( 'Primary Menu', 'mixfolio' ),
'secondary' => __( 'Secondary Menu', 'mixfolio' ),
) );
/**
* Custom Background
*/
add_theme_support( 'custom-background' );
}
endif; // mixfolio_setup
add_action( 'after_setup_theme', 'mixfolio_setup' );
/**
* Load Mixfolio options
*/
global $mixfolio_options;
$mixfolio_options = get_option( 'mixfolio_theme_options' );
/**
* Register widgetized area and update sidebar with default widgets
*
* @since Mixfolio 1.1
*/
function mixfolio_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar 1', 'mixfolio' ),
'id' => 'sidebar-1',
'before_widget' => '",
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'mixfolio_widgets_init' );
/**
* Enqueue scripts and styles
*
* @since Mixfolio 1.1
*/
function mixfolio_scripts() {
global $mixfolio_options;
// Theme stylesheet
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_style( 'mobile', get_template_directory_uri() . '/css/mobile.css' );
// Threaded comments
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
// Selectivizr - CSS3 pseudo-class and attribute selectors for IE 6-8
wp_register_script( 'selectivizr', get_template_directory_uri() . '/js/selectivizr-min.js', array( 'jquery' ), '1.0.2' );
wp_enqueue_script( 'selectivizr' );
// Reveal: jQuery Modals Made Easy
if ( isset( $mixfolio_options[ 'mixfolio_display_contact_information' ] ) && 'on' == $mixfolio_options[ 'mixfolio_display_contact_information' ] ) {
wp_register_script( 'reveal', get_template_directory_uri() . '/js/jquery.reveal.js', array( 'jquery' ), '1.0' );
wp_enqueue_script( 'reveal' );
}
// Enqueue toggle menu for small screens
wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true );
// Tweetable: jQuery twitter feed plugin, https://github.com/philipbeel/Tweetable
if (
is_home() &&
isset( $mixfolio_options[ 'mixfolio_twitter_id' ] ) && '' != $mixfolio_options[ 'mixfolio_twitter_id' ] &&
isset( $mixfolio_options[ 'mixfolio_display_welcome_area' ] ) && 'on' == $mixfolio_options[ 'mixfolio_display_welcome_area' ]
) {
wp_register_script( 'tweetable', get_template_directory_uri() . '/js/tweetable.jquery.js', array( 'jquery' ), '2.0' );
wp_enqueue_script( 'tweetable' );
}
// Mixfolio custom JS
wp_register_script( 'core', get_template_directory_uri() . '/js/jquery.core.js' );
wp_enqueue_script( 'core' );
}
add_action( 'wp_enqueue_scripts', 'mixfolio_scripts' );
/**
* Implement the Custom Header feature
*
* @since Mixfolio 1.1
*/
require( get_template_directory() . '/inc/custom-header.php' );
/**
* Show tweets in Welcome Area if active
*/
function mixfolio_welcome_area_tweets() {
if ( ! is_home() )
return;
global $mixfolio_options;
if (
isset( $mixfolio_options[ 'mixfolio_twitter_id' ] ) && '' != $mixfolio_options[ 'mixfolio_twitter_id' ] &&
isset( $mixfolio_options[ 'mixfolio_display_welcome_area' ] ) && 'on' == $mixfolio_options[ 'mixfolio_display_welcome_area' ]
) : ?>