array(
'icon' => 'fa fa-facebook',
'label' => __( 'Facebook', 'baton' )
),
'twitter_url' => array(
'icon' => 'fa fa-twitter',
'label' => __( 'Twitter', 'baton' )
),
'linkedin_url' => array(
'icon' => 'fa fa-linkedin',
'label' => __( 'LinkedIn', 'baton' )
),
'google_plus_url' => array(
'icon' => 'fa fa-google-plus',
'label' => __( 'Google+', 'baton' )
),
'youtube_url' => array(
'icon' => 'fa fa-youtube',
'label' => __( 'YouTube', 'baton' )
),
'vimeo_url' => array(
'icon' => 'fa fa-vimeo-square',
'label' => __( 'Vimeo', 'baton' )
),
'pinterest_url' => array(
'icon' => 'fa fa-pinterest',
'label' => __( 'Pinterest', 'baton' )
),
'instagram_url' => array(
'icon' => 'fa fa-instagram',
'label' => __( 'Instagram', 'baton' )
),
'flickr_url' => array(
'icon' => 'fa fa-flickr',
'label' => __( 'Flickr', 'baton' )
),
'foursquare_url' => array(
'icon' => 'fa fa-foursquare',
'label' => __( 'Foursquare', 'baton' )
),
'rss_url' => array(
'icon' => 'fa fa-rss',
'label' => __( 'RSS', 'baton' )
),
);
$social_font_map = apply_filters( 'sds_social_icon_map', $social_font_map );
?>
array( // Name used in saved option
'label' => __( 'Default', 'baton' ), // 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', 'baton' ) ),
'default' => true
),
'cols-1' => array( // Full Width
'label' => __( 'Full Width', 'baton' ),
'preview' => '',
),
'cols-2' => array( // Content Left, Primary Sidebar Right
'label' => __( 'Content Left', 'baton' ),
'preview' => ''
),
'cols-2-r' => array( // Content Right, Primary Sidebar Left
'label' => __( 'Content Right', 'baton' ),
'preview' => ''
)
);
return apply_filters( 'sds_theme_options_content_layouts', $content_layouts );
}
}
/**
* This function registers all color schemes available in this theme.
*/
if ( ! function_exists( 'sds_color_schemes' ) ) {
function sds_color_schemes() {
$color_schemes = array(
// Default (any additional color schemes should contain all of these properties as well as a 'deps' property)
'default' => array( // Name used in saved option
'label' => __( 'Default', 'baton' ), // Label on options panel (required)
'stylesheet' => false, // Stylesheet URL, relative to theme directory (required)
'preview' => '#7cb2c2', // Preview color on options panel (required)
'default' => true,
// Customizer
'background_color' => '#f1f5f9', // Default background color
),
// Blue
'blue' => array(
'label' => __( 'Blue', 'baton' ),
'stylesheet' => '/css/blue.css',
'preview' => '#3f70d4',
'deps' => 'baton',
// Customizer
'background_color' => '#ffffff', // Default background color
),
// Green
'green' => array(
'label' => __( 'Green', 'baton' ),
'stylesheet' => '/css/green.css',
'preview' => '#66bc7d',
'deps' => 'baton',
// Customizer
'background_color' => '#f1f5f9', // Default background color
),
// Red
'red' => array(
'label' => __( 'Red', 'baton' ),
'stylesheet' => '/css/red.css',
'preview' => '#ff5b5d',
'deps' => 'baton',
// Customizer
'background_color' => '#ffffff', // Default background color
)
);
return apply_filters( 'sds_theme_options_color_schemes', $color_schemes );
}
}
/**
* 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 'baton-1200x9999';
}
}
if ( ! function_exists( 'sds_copyright_branding' ) ) {
add_filter( 'sds_copyright_branding', 'sds_copyright_branding', 10, 2 );
function sds_copyright_branding( $text, $theme_name ) {
return '' . $theme_name . ' by Slocum Studio';
}
}
/**
* This function modifies the global $content_width value based on content layout or page template settings.
*/
if ( ! function_exists( 'baton_body_class' ) ) {
add_filter( 'body_class', 'baton_body_class', 20 );
function baton_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 = 1272;
// 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 = 1272;
// Customizer
if ( is_customize_preview() )
$classes['baton-customizer'] = 'customizer';
// Front Page
if ( is_front_page() ) {
// If the Front Page Sidebar is active
if ( baton_has_static_front_page() && sds_is_front_page_sidebar_active() )
$classes['baton-front-page-sidebar-active'] = 'front-page-sidebar-active';
// If Baton Conductor is enabled
if ( baton_has_blog_front_page() && have_posts() && baton_is_baton_conductor_enabled() ) {
$classes['baton-baton-conductor'] = 'baton-baton-conductor';
// Enhanced Display
if ( baton_is_baton_conductor_display_enhanced() )
$classes['baton-baton-conductor-enhanced-display'] = 'baton-baton-conductor-enhanced-display';
}
// If Conductor is active on the Front Page
if ( class_exists( 'Conductor' ) && Conductor::is_conductor() ) {
// Remove the CSS classes
if ( isset( $classes['baton-front-page-sidebar-active'] ) )
unset( $classes['baton-front-page-sidebar-active'] );
if ( isset( $classes['baton-baton-conductor-enhanced-display'] ) )
unset( $classes['baton-baton-conductor-enhanced-display'] );
if ( isset( $classes['baton-baton-conductor'] ) )
unset( $classes['baton-baton-conductor'] );
}
}
return $classes;
}
}
/**
* This function returns the more link label for Baton.
*/
function baton_more_link_label( $return_default_only = false ) {
// Return default
if ( $return_default_only )
return __( 'Continue Reading', 'baton' );
// Get theme mod
$label = get_theme_mod( 'baton_more_link_label' );
return ( ! empty( $label ) ) ? $label : __( 'Continue Reading', 'baton' );
}
/**
* This function returns the Boolean value of the parameter passed.
*/
if ( ! function_exists( 'baton_boolval' ) ) {
function baton_boolval( $var, $wp_customize_setting = false ) {
return ( bool ) $var;
}
}
/**
* Template for comments and pingbacks.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @param object $comment Comment to display.
* @param array $args Optional args.
* @param int $depth Depth of comment.
*/
if ( ! function_exists( 'baton_comment' ) ) {
function baton_comment( $comment, $args, $depth ) {
// Set the global comment variable to this comment
$GLOBALS['comment'] = $comment;
// Switch based on comment type
switch ( $comment->comment_type ) :
// Pingbacks and Trackbacks
case 'pingback':
case 'trackback':
?>
'primary-nav menu',
'echo' => true,
'show_home' => true,
'link_before' => '',
'link_after' => ''
) );
}
}
/**
* This function outputs a fallback menu for mobile devices and is used when the Primary Menu
* is inactive.
*/
if ( ! function_exists( 'baton_mobile_primary_menu_fallback' ) ) {
function baton_mobile_primary_menu_fallback() {
wp_page_menu( array(
'menu_class' => 'primary-nav primary-nav-mobile menu',
'echo' => true,
'show_home' => true,
'link_before' => '',
'link_after' => ''
) );
}
}
/**
* This function checks to see if Yoast Breadcrumbs are active.
*/
function baton_is_yoast_breadcrumbs_active() {
return ( function_exists( 'yoast_breadcrumb' ) && ( ( $wpseo_internallinks = get_option( 'wpseo_internallinks' ) ) && isset( $wpseo_internallinks['breadcrumbs-enable'] ) && $wpseo_internallinks['breadcrumbs-enable'] ) );
}
/**
* This determines if Baton Conductor enhanced display is enabled.
*/
function baton_is_baton_conductor_display_enhanced() {
// Grab the Baton_Conductor instance
$baton_conductor = Baton_Conductor_Instance();
return $baton_conductor->is_baton_conductor_enhanced_display_enabled();
}
/**
* This determines if Baton Conductor is enabled.
*/
function baton_is_baton_conductor_enabled() {
// Grab the Baton_Conductor instance
$baton_conductor = Baton_Conductor_Instance();
return $baton_conductor->is_baton_conductor_enabled();
}
/**
* This determines if a static front page is selected.
*/
function baton_has_static_front_page() {
return ( get_option( 'show_on_front' ) === 'page' && get_option( 'page_on_front' ) );
}
/**
* This determines if a blog front page is selected.
*/
function baton_has_blog_front_page() {
return ( ! baton_has_static_front_page() );
}
/**
* This is used as the active_callback for Baton Conductor customizer components.
*/
function baton_conductor_customizer_active_callback() {
return ( baton_is_baton_conductor_enabled() && baton_has_blog_front_page() );
}
/**
* This function outputs categories and tags.
*/
if ( ! function_exists( 'baton_categories_tags' ) ) {
function baton_categories_tags( $force_display = false ) {
// Grab categories and tags
$categories = get_the_category();
$tags = get_the_tags();
// CSS Classes
$css_classes = array(
( $categories ) ? 'has-categories' : 'no-categories',
( $tags ) ? 'has-tags' : 'no-tags'
);
?>
Baton
★★★★★ on
WordPress.org.', 'baton' ), 'https://wordpress.org/support/view/theme-reviews/baton?filter=5' ); ?>
%2$s by Slocum Studio', 'baton' ), esc_url( 'https://slocumthemes.com/wordpress-themes/baton/' ), $theme_name );
}
}
if ( ! function_exists( 'sds_about_page_pro_color_schemes_count' ) ) {
add_filter( 'sds_about_page_pro_color_schemes_count', 'sds_about_page_pro_color_schemes_count' );
function sds_about_page_pro_color_schemes_count( $count ) {
return 4;
}
}
if ( ! function_exists( 'sds_about_page_pro_content_layouts_count' ) ) {
add_filter( 'sds_about_page_pro_content_layouts_count', 'sds_about_page_pro_content_layouts_count' );
function sds_about_page_pro_content_layouts_count( $count ) {
return 3;
}
}
if ( ! function_exists( 'sds_about_page_free_vs_pro_table' ) ) {
add_filter( 'sds_about_page_free_vs_pro_table', 'sds_about_page_free_vs_pro_table' );
function sds_about_page_free_vs_pro_table() {
/*
* Individual Colors
*/
?>
|
|
|
|
|
|
|
|
|
|
|
|
'804',
'slug' => 'baton',
'type' => 'theme',
'public_key' => 'pk_c8cff28928d51a8f17df14c4dc864',
'is_premium' => false,
'has_premium_version' => false,
'has_addons' => false,
'has_paid_plans' => false,
'menu' => array(
'first-path' => 'themes.php',
'account' => false,
'contact' => false,
'support' => false,
),
) );
}
return $baton_fs;
}
// Initialize Freemius
baton_fs();
/**
* Load the theme function files (options panel, theme functions, widgets, etc...).
*/
include_once get_template_directory() . '/includes/class-tgm-plugin-activation.php'; // TGM Activation
include_once get_template_directory() . '/includes/theme-options.php'; // SDS Theme Options
include_once get_template_directory() . '/includes/theme-functions.php'; // SDS Theme Options Functions
include_once get_template_directory() . '/includes/widget-social-media.php'; // SDS Social Media Widget
include_once get_template_directory() . '/theme/class-baton.php'; // Baton Class (main functionality, actions/filters)
include_once get_template_directory() . '/theme/class-baton-customizer.php'; // Baton Customizer Class (specific to the customizer)
include_once get_template_directory() . '/theme/class-baton-conductor.php'; // Baton Conductor Class
include_once get_template_directory() . '/theme/class-baton-conductor-customizer.php'; // Baton Conductor Customizer Class (specific to the customizer)