'ffffff',
'text' => '000000',
'link' => 'dd5424',
'border' => 'CCCCCC',
'url' => 'dd5424',
);
}
/* Default content_width if using fullwidth page template */
function origin_content_width() {
global $content_width;
if ( is_page_template( 'page-template-fullwidth.php' ) )
$content_width = 940;
}
add_action( 'template_redirect', 'origin_content_width' );
/* Do theme setup on the 'after_setup_theme' hook. */
add_action( 'after_setup_theme', 'origin_theme_setup' );
function origin_sidebars() {
register_sidebar( array(
'id' => 'primary',
'name' => __( 'Primary', 'origin' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => ''
)
);
register_sidebar( array(
'id' => 'after-singular',
'name' => __( 'After Post', 'origin' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
register_sidebar( array(
'id' => 'footer-1',
'name' => __( 'Footer Column 1', 'origin' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
register_sidebar( array(
'id' => 'footer-2',
'name' => __( 'Footer Column 2', 'origin' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
register_sidebar( array(
'id' => 'footer-3',
'name' => __( 'Footer Column 3', 'origin' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
register_sidebar( array(
'id' => 'footer-4',
'name' => __( 'Footer Column 4', 'origin' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
}
add_action( 'widgets_init', 'origin_sidebars' );
/**
* Theme setup function. This function adds support for theme features and defines the default theme
* actions and filters.
*
*/
function origin_theme_setup() {
/* Add theme support for WordPress features. */
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );
add_image_size( 'single-thumbnail', 636, 310, true );
add_theme_support( 'custom-background' );
/* Custom header properties */
add_theme_support( 'custom-header', apply_filters( 'origin_custom_header_args', array(
'width' => 940,
'flex-width' => false,
'height' => 150,
'flex-height' => true,
'default-image' => '',
'default-text-color' => '000000',
'admin-head-callback' => 'origin_admin_header_style',
'wp-head-callback' => 'origin_header_style',
'admin-preview-callback' => 'origin_admin_header_image'
) ) );
/* Add support for custom menu */
register_nav_menu( 'primary', __( 'Navigation', 'origin' ) );
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
*/
load_theme_textdomain( 'origin', get_template_directory() . '/languages' );
}
/**
* Enqueue scripts and styles
*/
function origin_scripts() {
wp_enqueue_style( 'origin', get_stylesheet_uri() );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'origin_scripts' );
//Allow support for flex-width and height custom headers (if they're supported)
function origin_header_image_width() {
$width = 0;
if ( function_exists( 'get_custom_header' ) )
$width = get_custom_header()->width;
else
$width = HEADER_IMAGE_WIDTH;
return absint( $width );
}
function origin_header_image_height() {
$height = 0;
if ( function_exists( 'get_custom_header' ) )
$height = get_custom_header()->height;
else
$height = HEADER_IMAGE_HEIGHT;
return absint( $height );
}
// Referenced by add_theme_support custom-header in origin_theme_setup
function origin_header_style() {
// If no custom options for text are set, let's bail
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
if ( HEADER_TEXTCOLOR == get_header_textcolor() )
return;
// If we get this far, we have custom styles. Let's do this.
?>
>