array( // Name used in saved option
'label' => __( 'Default', 'epic' ), // Label on options panel (required)
'stylesheet' => false, // Stylesheet URL, relative to theme directory (required)
'preview' => '#565656', // Preview color on options panel (required)
'content_color' => '#555555', // Default content color (required)
'default' => true
),
'slocum-blue' => array(
'label' => __( 'Slocum Blue', 'epic' ),
'stylesheet' => '/css/slocum-blue.css',
'preview' => '#3c639a',
'content_color' => '#555555',
'deps' => 'epic'
)
);
return apply_filters( 'sds_theme_options_color_schemes', $color_schemes );
}
}
/**
* This function registers all web fonts available in this theme.
*/
if ( ! function_exists( 'sds_web_fonts' ) ) {
function sds_web_fonts() {
$web_fonts = array(
// Average Sans
'Lato:400' => array(
'label' => 'Lato',
'css' => 'font-family: \'Lato\', sans-serif;'
)
);
return apply_filters( 'sds_theme_options_web_fonts', $web_fonts );
}
}
/**
* This function registers all content layouts available in this theme.
*/
if ( ! function_exists( 'sds_content_layouts' ) ) {
function sds_content_layouts() {
$content_layouts = array(
'default' => array( // Name used in saved option
'label' => __( 'Default', 'epic' ), // Label on options panel (required)
'preview' => '
', // Preview on options panel (required; %1$s is replaced with values below on options panel if specified)
'preview_values' => array( __( 'Default', 'epic' ) ),
'default' => true
),
'cols-1' => array( // Full Width
'label' => __( 'Full Width', 'epic' ),
'preview' => '',
),
'cols-2' => array( // Content Left, Primary Sidebar Right
'label' => __( 'Content Left', 'epic' ),
'preview' => ''
),
'cols-2-r' => array( // Content Right, Primary Sidebar Left
'label' => __( 'Content Right', 'epic' ),
'preview' => ''
),
'cols-3' => array( // Content Left, Primary Sidebar Middle, Secondary Sidebar Right
'label' => __( 'Content, Sidebar, Sidebar', 'epic' ),
'preview' => ''
),
'cols-3-m' => array( // Primary Sidebar Left, Content Middle, Secondary Sidebar Right
'label' => __( 'Sidebar, Content, Sidebar', 'epic' ),
'preview' => ''
),
'cols-3-r' => array( // Primary Sidebar Left, Secondary Sidebar Middle, Content Right
'label' => __( 'Sidebar, Sidebar, Content', 'epic' ),
'preview' => ''
)
);
return apply_filters( 'sds_theme_options_content_layouts', $content_layouts );
}
}
/**
* This function sets the default image dimensions string on the options panel.
*/
if ( ! function_exists( 'sds_theme_options_logo_dimensions' ) ) {
add_filter( 'sds_theme_options_logo_dimensions', 'sds_theme_options_logo_dimensions' );
function sds_theme_options_logo_dimensions( $default ) {
return '500x160';
}
}
/**
* This function sets a default featured image size for use in this theme.
*/
if ( ! function_exists( 'sds_theme_options_default_featured_image_size' ) ) {
add_filter( 'sds_theme_options_default_featured_image_size', 'sds_theme_options_default_featured_image_size' );
function sds_theme_options_default_featured_image_size( $default ) {
return 'epic-765x400';
}
}
/**
* This function modifies the featured image size output based on content layout settings.
*/
if ( ! function_exists( 'sds_featured_image_size' ) ) {
add_filter( 'sds_featured_image_size', 'sds_featured_image_size', 10, 2 );
function sds_featured_image_size( $size, $link_image ) {
global $sds_theme_options;
// Content layout was specified by user in Theme Options
if ( isset( $sds_theme_options['body_class'] ) && ! empty( $sds_theme_options['body_class'] ) ) {
if ( $sds_theme_options['body_class'] === 'cols-1' )
$size = 'epic-1200x400'; // Full width image
}
return $size;
}
}
/**
* This function modifies the global $content_width value based on content layout or page template settings.
*/
if ( ! function_exists( 'epic_body_class' ) ) {
add_filter( 'body_class', 'epic_body_class', 20 );
function epic_body_class( $classes ) {
global $sds_theme_options, $content_width;
// Content layout was specified by user in Theme Options
if ( isset( $sds_theme_options['body_class'] ) && ! empty( $sds_theme_options['body_class'] ) ) {
// 1 Column
if ( $sds_theme_options['body_class'] === 'cols-1' )
$content_width = 1200;
// 3 Columns
else if ( strpos( $sds_theme_options['body_class'], 'cols-3' ) !== false )
$content_width = 550;
}
// Page Template was specified by the user for this page
if ( ! empty( $sds_theme_options['page_template'] ) && $sds_theme_options['page_template'] !== 'default' ) {
// Full Width or Landing Page
if( in_array( $sds_theme_options['page_template'], array( 'page-full-width.php', 'page-landing-page.php' ) ) )
$content_width = 1200;
}
return $classes;
}
}
/**
* This function adds the custom Theme Customizer styles to the tag.
*/
if ( ! function_exists( 'epic_wp_head' ) ) {
add_filter( 'wp_head', 'epic_wp_head', 20 );
function epic_wp_head() {
$sds_theme_options_instance = SDS_Theme_Options_Instance();
?>
%2$s %3$s',
esc_url( sds_get_pro_link( 'theme-options-colors' ) ),
__( 'Upgrade to Epic Pro', 'epic' ),
__( 'and receive more color schemes!', 'epic' )
);
?>
%2$s %3$s',
esc_url( sds_get_pro_link( 'theme-options-fonts' ) ),
__( 'Upgrade to Epic Pro', 'epic' ),
__( 'to use more web fonts!', 'epic' )
);
?>
%2$s %3$s',
esc_url( sds_get_pro_link( 'theme-options-help' ) ),
__( 'Upgrade to Epic Pro', 'epic' ),
__( 'to receive priority ticketing support!', 'epic' )
);
?>
Epic Forums on WordPress.org.', 'epic' ), esc_url( 'http://wordpress.org/support/theme/epic/' ) ); ?>
%2$s by Slocum Studio', 'epic' ), esc_url( 'http://slocumthemes.com/wordpress-themes/epic-free/' ), $theme_name );
}
}