ACC SHELL
<?php
// load theme text domain
load_theme_textdomain ('coffee', get_template_directory() . '/languages');
// register navigation
register_nav_menu('primary', __( 'Header Menu', 'coffee' ));
register_nav_menu('footer', __( 'Footer Menu', 'coffee' ));
// handle support for automatic feed links, custom backgrounds and featured images
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );
// define paths
define('COFFEE_DIR', get_template_directory() .'/coffee-framework');
define('COFFEE_URL', get_template_directory_uri() .'/coffee-framework');
// load framework
include(COFFEE_DIR .'/coffee-core.php');
include("shortcodes/shortcodes.php");
include('shortcodes/tinymce/tinymce.loader.php');
// adjusting post formats base on post type
function coffee_adjust_post_formats() {
if (isset($_GET['post'])) {
$post = get_post($_GET['post']);
if ($post) $post_type = $post->post_type;
} elseif ( !isset($_GET['post_type']) ) $post_type = 'post';
elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) $post_type = $_GET['post_type'];
else return;
if ('portfolio-type' == $post_type ) add_theme_support( 'post-formats', array( 'gallery', 'audio', 'video' ) );
elseif ( 'post' == $post_type ) add_theme_support( 'post-formats', array( 'gallery', 'video', 'audio', 'quote', 'link' ) );
}
add_action( 'load-post.php','coffee_adjust_post_formats' );
add_action( 'load-post-new.php','coffee_adjust_post_formats' );
// set content width & thumbnail sizes
if ( ! isset( $content_width ) ) $content_width = 780;
set_post_thumbnail_size( 780, 350 );
add_image_size( 'thumbnail-780x9999', 780, 9999);
add_image_size( 'thumbnail-780x350', 780, 350, true);
add_image_size( 'thumbnail-780x350', 780, 350, true);
add_image_size( 'thumbnail-280x275', 280, 275, true);
add_image_size( 'thumbnail-55x55', 55, 55, true);
add_image_size( 'thumbnail-50x50', 50, 50, true);
// change search function to only search in posts
function exclude_pages($query) {
if ($query->is_search) {
$query->set('post_type', array('post'));
}
return $query;
}
add_filter('pre_get_posts','exclude_pages');
// register sidebars
register_sidebar(array(
'name'=> 'Blog sidebar',
'id' => 'blog-sidebar',
'description' => __( 'Blog sidebar.', 'coffee' ),
'before_widget' => '<div class="widget sidebar-widget clearfix %2$s" id="%1$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title-wrapper"><div class="widget-title heading-font">',
'after_title' => '</div></div>',
));
register_sidebar(array(
'name'=> 'Page sidebar',
'id' => 'page-sidebar',
'description' => __( 'Page sidebar.', 'coffee' ),
'before_widget' => '<div class="widget sidebar-widget clearfix %2$s" id="%1$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title-wrapper"><div class="widget-title heading-font">',
'after_title' => '</div></div>',
));
register_sidebar(array(
'name'=> 'Contact sidebar',
'id' => 'contact-sidebar',
'description' => __( 'Contact sidebar.', 'coffee' ),
'before_widget' => '<div class="widget sidebar-widget clearfix %2$s" id="%1$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title-wrapper"><div class="widget-title heading-font">',
'after_title' => '</div></div>',
));
register_sidebar(array(
'name'=> 'Footer first column',
'id' => 'footer-first-column',
'before_widget' => '<div class="widget footer-widget clearfix %2$s" id="%1$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title-wrapper"><div class="widget-title heading-font">',
'after_title' => '</div></div>',
));
register_sidebar(array(
'name'=> 'Footer secound column',
'id' => 'footer-secound-column',
'before_widget' => '<div class="widget footer-widget clearfix %2$s" id="%1$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title-wrapper"><div class="widget-title heading-font">',
'after_title' => '</div></div>',
));
register_sidebar(array(
'name'=> 'Footer third column',
'id' => 'footer-third-column',
'before_widget' => '<div class="widget footer-widget clearfix %2$s" id="%1$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title-wrapper"><div class="widget-title heading-font">',
'after_title' => '</div></div>',
));
register_sidebar(array(
'name'=> 'Footer fourth column',
'id' => 'footer-fourth-column',
'before_widget' => '<div class="widget footer-widget clearfix %2$s" id="%1$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title-wrapper"><div class="widget-title heading-font">',
'after_title' => '</div></div>',
));
// loading colour scheme
add_action('wp_enqueue_scripts', 'coffee_colour_scheme');
function coffee_colour_scheme(){
$colour_scheme = get_option('colour_scheme', 'turquoise');
wp_register_style('coffee-colour-scheme', get_template_directory_uri().'/css/'.$colour_scheme.'.css');
wp_enqueue_style('coffee-colour-scheme');
}
add_action( 'customize_register', 'coffee_colour_scheme_controls' );
// colour scheme controls
function coffee_colour_scheme_controls($wp_customize){
$wp_customize->add_section('colour_section', array(
'title'=> __( "Colour Options", 'coffee' ),
'priority' => 140
));
$wp_customize->add_setting('colour_scheme', array(
'default' => 'turquoise',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('colour_scheme',
array(
'label'=> __('Colour Scheme', 'coffee'),
'section'=> 'colour_section',
'settings' => 'colour_scheme',
'type' => 'select',
'choices' => array(
'alizarin' => 'Alizarin',
'amethyst' => 'Amethyst',
'belize-hole' => 'Belize Hole',
'carrot' => 'Carrot',
'emerald' => 'Emerald',
'green-sea' => 'Green Sea',
'nephritis' => 'Nephritis',
'orange' => 'Orange',
'peter-river' => 'Peter River',
'pomegranate' => 'Pomegranate',
'pumpkin' => 'Pumpkin',
'sun-flower' => 'Sun Flower',
'turquoise' => 'Turquoise',
'wet-asphalt' => 'Wet Asphalt',
'wisteria' => 'Wisteria',
'custom' => 'Custom'
),
'priority' => 5
)
);
}
// enqeue jquery library in header for sake of any inline jquery, google maps api loaded in header of contact page template
add_action('wp_enqueue_scripts', 'coffee_enqueue_scripts_header');
function coffee_enqueue_scripts_header() {
if (!is_admin()) {
wp_register_style('fancybox_css', get_template_directory_uri().'/javascript/fancybox/jquery.fancybox.css');
wp_enqueue_style('fancybox_css');
wp_enqueue_script('jquery');
wp_register_script('google-maps', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', NULL, NULL, TRUE);
if (is_page_template('template-contact.php') ) {
wp_enqueue_script('google-maps');
}
}
}
// enqueue rest of scripts in footer
add_action('wp_footer', 'coffee_enqueue_scripts_footer');
function coffee_enqueue_scripts_footer() {
if (!is_admin()) {
wp_register_script('custom', get_template_directory_uri().'/javascript/init.js');
wp_register_script('debouncedresize', get_template_directory_uri().'/javascript/debouncedresize.js');
wp_register_script('hoverIntent', get_template_directory_uri().'/javascript/hoverIntent.js');
wp_register_script('nicescroll', get_template_directory_uri().'/javascript/nicescroll.min.js');
wp_register_script('flexslider', get_template_directory_uri().'/javascript/flexslider-min.js');
wp_register_script('imagesloaded', get_template_directory_uri().'/javascript/imagesloaded.min.js');
wp_register_script('fitvid', get_template_directory_uri().'/javascript/fitvids.js');
wp_register_script('isotope', get_template_directory_uri().'/javascript/isotope.min.js');
wp_register_script('carou', get_template_directory_uri().'/javascript/carouFredSel.min.js');
wp_register_script('easing', get_template_directory_uri().'/javascript/easing.min.js');
wp_register_script('swipe', get_template_directory_uri().'/javascript/touchSwipe.min.js');
wp_register_script('fancybox', get_template_directory_uri().'/javascript/fancybox/jquery.fancybox.pack.js');
wp_enqueue_script('jquery-ui-accordion');
wp_enqueue_script('jquery-ui-tabs');
wp_enqueue_script('custom');
wp_enqueue_script('debouncedresize');
wp_enqueue_script('hoverIntent');
wp_enqueue_script('nicescroll');
wp_enqueue_script('flexslider');
wp_enqueue_script('imagesloaded');
wp_enqueue_script('fitvid');
wp_enqueue_script('isotope');
wp_enqueue_script('carou');
wp_enqueue_script('easing');
wp_enqueue_script('swipe');
wp_enqueue_script('fancybox');
}
}
// adding new tab to admin bar just for fast access to posts, pages, portfolio and team
add_action( 'admin_bar_menu', 'coffee_admin_bar_render', 80);
function coffee_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->add_menu( array(
'id' => 'manage-content',
'meta' => array(),
'title' => __('Manage Content', 'coffee'),
'href' => admin_url( 'edit.php')
));
$wp_admin_bar->add_menu( array(
'parent' => 'manage-content',
'id' => 'posts-manage',
'title' => __('Posts', 'coffee'),
'href' => admin_url( 'edit.php')
));
$wp_admin_bar->add_menu( array(
'parent' => 'manage-content',
'id' => 'page-manage',
'title' => __('Pages', 'coffee'),
'href' => admin_url( 'edit.php?post_type=page')
));
$wp_admin_bar->add_menu( array(
'parent' => 'manage-content',
'id' => 'portfolio-manage',
'title' => __('Portfolio', 'coffee'),
'href' => admin_url( 'edit.php?post_type=portfolio-type')
));
$wp_admin_bar->add_menu( array(
'parent' => 'manage-content',
'id' => 'team-manage',
'title' => __('Team', 'coffee'),
'href' => admin_url( 'edit.php?post_type=team-type')
));
}
// adding metaboxes
add_action('add_meta_boxes', 'coffee_metabox');
function coffee_metabox(){
$meta_box = array(
'id' => 'coffee-metabox-team',
'title' => __('Team Member Settings', 'coffee'),
'description' => '',
'page' => 'team-type',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Member position', 'coffee'),
'desc' => '',
'id' => 'coffee_member_position',
'type' => 'text',
'std' => __('Employee', 'coffee'),
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-home',
'title' => __('Home Settings', 'coffee'),
'description' => '',
'page' => 'page',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Slider', 'coffee'),
'desc' => __('Select slider to display.', 'coffee'),
'id' => 'coffee_home_slider',
'type' => 'select',
'std' => '',
'options' => (is_array(coffee_find_layersliders(true)) ? array_flip(coffee_find_layersliders(true)) : array(__('No sliders created', 'coffee')))
),
array(
'name' => __('Parallax Scrolling Speed', 'coffee'),
'desc' => __('Type parallax scrolling speed (lower value result in faster scrolling).', 'coffee'),
'id' => 'coffee_parallax_slider_speed',
'type' => 'text',
'std' => '12'
),
array(
'name' => __('Display portfolio', 'coffee'),
'desc' => __('Check to show portfolio.', 'coffee'),
'id' => 'coffee_portfolio_normal',
'type' => 'checkbox',
'std' => 'false'
),
array(
'name' => __('Display portfolio carousel', 'coffee'),
'desc' => __('Check to show portfolio carousel.', 'coffee'),
'id' => 'coffee_portfolio_carousel',
'type' => 'checkbox',
'std' => 'true'
),
array(
'name' => __('Carousel title', 'coffee'),
'desc' => __('Type carousel carousel title.', 'coffee'),
'id' => 'coffee_portfolio_carousel_title',
'type' => 'text',
'std' => __('Recent Projects', 'coffee')
),
array(
'name' => __('Number of items:', 'coffee'),
'desc' => __('Type number of items to load (-1 returns all published).', 'coffee'),
'id' => 'coffee_portfolio_carousel_number',
'type' => 'text',
'std' => '4'
),
array(
'name' => __('Display blog carousel', 'coffee'),
'desc' => __('Check to show blog carousel.', 'coffee'),
'id' => 'coffee_blog_carousel',
'type' => 'checkbox',
'std' => 'false'
),
array(
'name' => __('Carousel title', 'coffee'),
'desc' => __('Type carousel carousel title.', 'coffee'),
'id' => 'coffee_blog_carousel_title',
'type' => 'text',
'std' => __('Recent News', 'coffee')
),
array(
'name' => __('Number of items:', 'coffee'),
'desc' => __('Type number of items to load (-1 returns all published).', 'coffee'),
'id' => 'coffee_blog_carousel_number',
'type' => 'text',
'std' => '4'
),
array(
'name' => __('Display team carousel', 'coffee'),
'desc' => __('Check show team carousel.', 'coffee'),
'id' => 'coffee_team_carousel',
'type' => 'checkbox',
'std' => 'false'
),
array(
'name' => __('Carousel title', 'coffee'),
'desc' => __('Type carousel carousel title.', 'coffee'),
'id' => 'coffee_team_carousel_title',
'type' => 'text',
'std' => __('Our Team', 'coffee'),
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-contact',
'title' => __('Contact Settings', 'coffee'),
'description' => '',
'page' => 'page',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Page Header', 'coffee'),
'desc' => __('Pick header for this page.</br></br> Map is using height and parallax speed from Parallax Settings.', 'coffee'),
'id' => 'coffee_contact_header',
'type' => 'select',
'std' => 'map',
'options' => array(
'map' => __('Map', 'coffee'),
'parallax' => __('Parallax Header', 'coffee')
)
),
array(
'name' => __('Default Map Zoom Level', 'coffee'),
'desc' => __('Value should be between 1-18, 1 being the entire earth and 18 being right at street level.', 'coffee'),
'id' => 'coffee_google_map_zoom',
'type' => 'text',
'std' => '5'
),
array(
'name' => __('Map Center Latitude', 'coffee'),
'desc' => __('Please enter the latitude for the maps center point.', 'coffee'),
'id' => 'coffee_google_map_latitude',
'type' => 'text',
'std' => '40.714353'
),
array(
'name' => __('Map Center Longitude', 'coffee'),
'desc' => __('Please enter the longitude for the maps center point.', 'coffee'),
'id' => 'coffee_google_map_longitude',
'type' => 'text',
'std' => '-74.005973'
),
array(
'name' => __('Enable Map Zoom In/Out', 'coffee'),
'desc' => __('Do you want users to be able to zoom in/out on the map?', 'coffee'),
'id' => 'coffee_google_map_allow_zoom',
'type' => 'checkbox',
'std' => 'false'
),
array(
'name' => __('Show marker', 'coffee'),
'desc' => __('After uploading image and setting content check this to show marker.', 'coffee'),
'id' => 'coffee_google_map_marker',
'type' => 'checkbox',
'std' => 'false'
),
array(
'name' => __('Marker Image', 'coffee'),
'desc' => __('Pick image for marker.', 'coffee'),
'id' => 'coffee_google_map_marker_icon',
'type' => 'file',
'std' => ''
),
array(
'name' => __('Marker content', 'coffee'),
'desc' => __('Type here content for marker.', 'coffee'),
'id' => 'coffee_google_map_marker_content',
'type' => 'textarea',
'std' => 'Marker content.'
),
array(
'name' => __('Marker Center Latitude', 'coffee'),
'desc' => __('Please enter the latitude for the marker.', 'coffee'),
'id' => 'coffee_google_map_marker_latitude',
'type' => 'text',
'std' => '40.714353'
),
array(
'name' => __('Marker Center Longitude', 'coffee'),
'desc' => __('Please enter the longitude for the marker.', 'coffee'),
'id' => 'coffee_google_map_marker_longitude',
'type' => 'text',
'std' => '-74.005973'
),
array(
'name' => __('Contact E-mail', 'coffee'),
'desc' => __('Type here e-mail address for contact form.', 'coffee'),
'id' => 'coffee_contact_email',
'type' => 'text',
'std' => get_option('admin_email')
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-parallax',
'title' => __('Parallax Settings', 'coffee'),
'description' => '',
'page' => 'post',
'context' => 'normal',
'priority' => 'low',
'fields' => array(
array(
'name' => __('Parallax Title', 'coffee'),
'desc' => __('Type title for parallax.', 'coffee'),
'id' => 'coffee_parallax_title',
'type' => 'text',
),
array(
'name' => __('Parallax Background', 'coffee'),
'desc' => __('Upload parallax background.', 'coffee'),
'id' => 'coffee_parallax_background',
'type' => 'file',
'std' => ''
),
array(
'name' => __('Parallax Section Height', 'coffee'),
'desc' => __('Type parallax section height. ', 'coffee'),
'id' => 'coffee_parallax_height',
'type' => 'text',
'std' => '0'
),
array(
'name' => __('Parallax Scrolling Speed', 'coffee'),
'desc' => __('Type parallax scrolling speed (lower value result in faster scrolling).', 'coffee'),
'id' => 'coffee_parallax_speed',
'type' => 'text',
'std' => '12'
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box['page'] = 'page';
coffee_add_meta_box( $meta_box );
$meta_box['page'] = 'portfolio-type';
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-video',
'title' => __('Video Settings', 'coffee'),
'description' => '',
'page' => 'post',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Shared Video', 'coffee'),
'desc' => __('Paste here shared video from YouTube, Vimeo etc.', 'coffee'),
'id' => 'coffee_shared_video',
'type' => 'textarea',
'std' => ''
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box['page'] = 'portfolio-type';
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-audio',
'title' => __('Audio Settings', 'coffee'),
'description' => '',
'page' => 'post',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Shared Audio', 'coffee'),
'desc' => __('Paste here shared audio from SoundCloud etc.', 'coffee'),
'id' => 'coffee_shared_audio',
'type' => 'textarea',
'std' => ''
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box['page'] = 'portfolio-type';
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-gallery',
'title' => __('Gallery Settings', 'coffee'),
'description' => '',
'page' => 'post',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Shared Video', 'coffee'),
'desc' => __('Paste here shared audio from SoundCloud etc.', 'coffee'),
'id' => 'coffee_gallery',
'type' => 'images',
'std' => __('Upload images', 'coffee')
),
array(
'name' => __('Slideshow', 'coffee'),
'desc' => __('Decide when to turn auto slideshow.', 'coffee'),
'id' => 'coffee_gallery_slideshow',
'type' => 'select',
'options' => array(
'no_autoslide' => __('Only manual', 'coffee'),
'autoslide' => __('Automatic', 'coffee'),
),
'std' => 'no_autoslide'
),
)
);
coffee_add_meta_box( $meta_box );
$meta_box['page'] = 'portfolio-type';
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-quote',
'title' => __('Quote Settings', 'coffee'),
'description' => '',
'page' => 'post',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Quote', 'coffee'),
'desc' => __('Paste here quote.', 'coffee'),
'id' => 'coffee_quote',
'type' => 'text',
'std' => ''
),
array(
'name' => __('Quote Author', 'coffee'),
'desc' => __('Author name.', 'coffee'),
'id' => 'coffee_quote_author',
'type' => 'text',
'std' => ''
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-link',
'title' => __('Link Settings', 'coffee'),
'description' => '',
'page' => 'post',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Link title', 'coffee'),
'desc' => __('This one will be displayed.', 'coffee'),
'id' => 'coffee_link_title',
'type' => 'text',
'std' => '',
),
array(
'name' => __('Actual link.', 'coffee'),
'desc' => __('Here paste link.', 'coffee'),
'id' => 'coffee_link',
'type' => 'text',
'std' => '',
)
)
);
coffee_add_meta_box( $meta_box );
$meta_box = array(
'id' => 'coffee-metabox-portfolio-type-options',
'title' => __('Portfolio Settings', 'coffee'),
'description' => '',
'page' => 'portfolio-type',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __('Single page display type', 'coffee'),
'desc' => __('Pick one of possible ways to display content on single page.', 'coffee'),
'id' => 'coffee_portfolio_type',
'type' => 'select',
'options' => array(
'large_left' => __('Portfolio Type #1', 'coffee'),
'large_right' => __('Portfolio Type #2', 'coffee'),
'medium_left' => __('Portfolio Type #3', 'coffee'),
),
'std' => 'large_right'
),
array(
'name' => __('Client Name', 'coffee'),
'desc' => __('Type client name, leave empty and nothing will happen.', 'coffee'),
'id' => 'coffee_portfolio_client',
'type' => 'text',
'std' => ''
),
)
);
coffee_add_meta_box( $meta_box );
}
// customizer options
add_action( 'customize_register', 'coffee_customizer_options' );
function coffee_customizer_options( $wp_customize ) {
$wp_customize->add_setting('custom_logo', array(
'default' => get_template_directory_uri().'/img/logo.png',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,
'custom_logo', array(
'section'=> 'title_tagline',
'settings' => 'custom_logo',
'label' => __('Upload normal logotype.','coffee'),
'priority' => 21
)
));
$wp_customize->add_section('sidebar_section', array(
'title'=> __( "Sidebar's Options", 'coffee' ),
'priority' => 200
));
$wp_customize->add_setting('blog_sidebar', array(
'default' => '',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('blog_sidebar',
array(
'label'=> __('Blog Sidebar Position', 'coffee'),
'section'=> 'sidebar_section',
'settings' => 'blog_sidebar',
'type' => 'select',
'choices' => array(
'left' => 'Left',
'right' => 'Right'
),
'priority' => 5
)
);
$wp_customize->add_setting('page_sidebar', array(
'default' => '',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('page_sidebar',
array(
'label'=> __('Page Template Sidebar Position', 'coffee'),
'section'=> 'sidebar_section',
'settings' => 'page_sidebar',
'type' => 'select',
'choices' => array(
'left' => 'Left',
'right' => 'Right'
),
'priority' => 10
)
);
$wp_customize->add_setting('contact_page_sidebar', array(
'default' => '',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('contact_sidebar_sidebar',
array(
'label'=> __('Contact Template Sidebar Position', 'coffee'),
'section'=> 'sidebar_section',
'settings' => 'contact_page_sidebar',
'type' => 'select',
'choices' => array(
'left' => 'Left',
'right' => 'Right'
),
'priority' => 10
)
);
$wp_customize->add_section('parallax_section', array(
'title'=> __( 'Parallax Options', 'coffee' ),
'priority' => 280
));
$wp_customize->add_setting('parallax_background', array(
'default' => get_template_directory_uri().'/img/parallax-bg.jpg',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,
'parallax_background', array(
'section' => 'parallax_section',
'settings' => 'parallax_background',
'label' => __('Default Parallax Background', 'coffee'),
'priority' => 1
)
));
$wp_customize->add_setting('parallax_height', array(
'default' => 125,
'type' => 'option',
'capability' => 'edit_theme_options',
));
$wp_customize->add_control('parallax_height',
array(
'label'=> __('Default Parallax Height', 'coffee'),
'section'=> 'parallax_section',
'settings' => 'parallax_height',
'type' => 'text',
'priority' => 5
)
);
$wp_customize->add_setting('parallax_speed', array(
'default' => 12,
'type' => 'option',
'capability' => 'edit_theme_options',
));
$wp_customize->add_control('parallax_speed',
array(
'label'=> __('Default Parallax Speed', 'coffee'),
'section'=> 'parallax_section',
'settings' => 'parallax_speed',
'type' => 'text',
'priority' => 5
)
);
$wp_customize->add_section('footer_section', array(
'title'=> __( 'Footer Options', 'coffee' ),
'priority' => 300
));
$wp_customize->add_setting('footer_call_to_action', array(
'default' => true,
'type' => 'option',
'capability' => 'edit_theme_options'
));
$wp_customize->add_control('footer_call_to_action',
array(
'label'=> __('Show call to action.', 'coffee'),
'section'=> 'footer_section',
'settings' => 'footer_call_to_action',
'type' => 'checkbox',
'priority' => 2
)
);
$wp_customize->add_setting( 'footer_call_to_action_text', array(
'default' => 'Call to action section on every single page. Love Amplius? <a href="#">Buy This Theme!</a>',
'type' => 'option',
'capability' => 'edit_theme_options'
));
$wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'footer_call_to_action_text', array(
'label'=> __('Call to action', 'coffee'),
'section'=> 'footer_section',
'settings' => 'footer_call_to_action_text',
'type' => 'text',
'priority' => 5
)));
$wp_customize->add_setting('footer_twitterfeed', array(
'default' => true,
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('footer_twitterfeed',
array(
'label'=> __('Show twitter feed.', 'coffee'),
'section'=> 'footer_section',
'settings' => 'footer_twitterfeed',
'type' => 'checkbox',
'priority' => 10
)
);
$wp_customize->add_setting('tdf_tweets_number', array(
'default' => 5,
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('tdf_tweets_number', array(
'label'=> __('Number of tweets in footer feed.', 'coffee'),
'section'=> 'footer_section',
'settings' => 'tdf_tweets_number',
'type' => 'select',
'choices' => array(
1 => '1',
2 => '2',
3 => '3',
4 => '4',
5 => '5',
6 => '6',
7 => '7',
8 => '8',
9 => '9',
10 => '10',
11 => '11',
12 => '12',
13 => '13',
14 => '14',
15 => '15',
16 => '16',
17 => '17',
18 => '18',
19 => '19',
20 => '20'
),
'priority' => 15
)
);
$wp_customize->add_setting('tdf_user_timeline', array(
'default' => 'envato',
'type' => 'option',
'capability' => 'edit_theme_options'
));
$wp_customize->add_control('tdf_user_timeline',
array(
'label'=> __('Twitter Feed Screen Name', 'coffee'),
'section'=> 'footer_section',
'settings' => 'tdf_user_timeline',
'type' => 'text',
'priority' => 17
)
);
$wp_customize->add_setting('footer_copyright', array(
'default' => '© Copyright 2013. Powered By <a href="#">WordPress</a>',
'type' => 'option',
'capability' => 'edit_theme_options'
));
$wp_customize->add_control('footer_copyright',
array(
'label'=> __('Copyrights', 'coffee'),
'section'=> 'footer_section',
'settings' => 'footer_copyright',
'type' => 'text',
'priority' => 50
)
);
$wp_customize->add_section('javascript_section', array(
'title'=> __( 'Javascript Options', 'coffee' ),
'priority' => 350
));
$wp_customize->add_setting('nicescroll_switch', array(
'default' => true,
'type' => 'option',
'capability' => 'edit_theme_options'
));
$wp_customize->add_control('nicescroll_switch',
array(
'label'=> __('Nicescroll', 'coffee'),
'section'=> 'javascript_section',
'settings' => 'nicescroll_switch',
'type' => 'checkbox',
'priority' => 1
)
);
$wp_customize->add_setting('header_switch', array(
'default' => true,
'type' => 'option',
'capability' => 'edit_theme_options'
));
$wp_customize->add_control('header_switch',
array(
'label'=> __('Sticky header + Parallax', 'coffee'),
'section'=> 'javascript_section',
'settings' => 'header_switch',
'type' => 'checkbox',
'priority' => 1
)
);
$fonts_array = array(
'ABeeZee' => 'ABeeZee',
'Abel' => 'Abel',
'Abril Fatface' => 'Abril Fatface',
'Aclonica' => 'Aclonica',
'Acme' => 'Acme',
'Actor' => 'Actor',
'Adamina' => 'Adamina',
'Advent Pro' => 'Advent Pro',
'Aguafina Script' => 'Aguafina Script',
'Akronim' => 'Akronim',
'Aladin' => 'Aladin',
'Aldrich' => 'Aldrich',
'Alef' => 'Alef',
'Alegreya' => 'Alegreya',
'Alegreya SC' => 'Alegreya SC',
'Alex Brush' => 'Alex Brush',
'Alfa Slab One' => 'Alfa Slab One',
'Alice' => 'Alice',
'Alike' => 'Alike',
'Alike Angular' => 'Alike Angular',
'Allan' => 'Allan',
'Allerta' => 'Allerta',
'Allerta Stencil' => 'Allerta Stencil',
'Allura' => 'Allura',
'Almendra' => 'Almendra',
'Almendra Display' => 'Almendra Display',
'Almendra SC' => 'Almendra SC',
'Amarante' => 'Amarante',
'Amaranth' => 'Amaranth',
'Amatic SC' => 'Amatic SC',
'Amethysta' => 'Amethysta',
'Anaheim' => 'Anaheim',
'Andada' => 'Andada',
'Andika' => 'Andika',
'Angkor' => 'Angkor',
'Annie Use Your Telescope' => 'Annie Use Your Telescope',
'Anonymous Pro' => 'Anonymous Pro',
'Antic' => 'Antic',
'Antic Didone' => 'Antic Didone',
'Antic Slab' => 'Antic Slab',
'Anton' => 'Anton',
'Arapey' => 'Arapey',
'Arbutus' => 'Arbutus',
'Arbutus Slab' => 'Arbutus Slab',
'Architects Daughter' => 'Architects Daughter',
'Archivo Black' => 'Archivo Black',
'Archivo Narrow' => 'Archivo Narrow',
'Arimo' => 'Arimo',
'Arizonia' => 'Arizonia',
'Armata' => 'Armata',
'Artifika' => 'Artifika',
'Arvo' => 'Arvo',
'Asap' => 'Asap',
'Asset' => 'Asset',
'Astloch' => 'Astloch',
'Asul' => 'Asul',
'Atomic Age' => 'Atomic Age',
'Aubrey' => 'Aubrey',
'Audiowide' => 'Audiowide',
'Autour One' => 'Autour One',
'Average' => 'Average',
'Average Sans' => 'Average Sans',
'Averia Gruesa Libre' => 'Averia Gruesa Libre',
'Averia Libre' => 'Averia Libre',
'Averia Sans Libre' => 'Averia Sans Libre',
'Averia Serif Libre' => 'Averia Serif Libre',
'Bad Script' => 'Bad Script',
'Balthazar' => 'Balthazar',
'Bangers' => 'Bangers',
'Basic' => 'Basic',
'Battambang' => 'Battambang',
'Baumans' => 'Baumans',
'Bayon' => 'Bayon',
'Belgrano' => 'Belgrano',
'Belleza' => 'Belleza',
'BenchNine' => 'BenchNine',
'Bentham' => 'Bentham',
'Berkshire Swash' => 'Berkshire Swash',
'Bevan' => 'Bevan',
'Bigelow Rules' => 'Bigelow Rules',
'Bigshot One' => 'Bigshot One',
'Bilbo' => 'Bilbo',
'Bilbo Swash Caps' => 'Bilbo Swash Caps',
'Bitter' => 'Bitter',
'Black Ops One' => 'Black Ops One',
'Bokor' => 'Bokor',
'Bonbon' => 'Bonbon',
'Boogaloo' => 'Boogaloo',
'Bowlby One' => 'Bowlby One',
'Bowlby One SC' => 'Bowlby One SC',
'Brawler' => 'Brawler',
'Bree Serif' => 'Bree Serif',
'Bubblegum Sans' => 'Bubblegum Sans',
'Bubbler One' => 'Bubbler One',
'Buda' => 'Buda',
'Buenard' => 'Buenard',
'Butcherman' => 'Butcherman',
'Butterfly Kids' => 'Butterfly Kids',
'Cabin' => 'Cabin',
'Cabin Condensed' => 'Cabin Condensed',
'Cabin Sketch' => 'Cabin Sketch',
'Caesar Dressing' => 'Caesar Dressing',
'Cagliostro' => 'Cagliostro',
'Calligraffitti' => 'Calligraffitti',
'Cambo' => 'Cambo',
'Candal' => 'Candal',
'Cantarell' => 'Cantarell',
'Cantata One' => 'Cantata One',
'Cantora One' => 'Cantora One',
'Capriola' => 'Capriola',
'Cardo' => 'Cardo',
'Carme' => 'Carme',
'Carrois Gothic' => 'Carrois Gothic',
'Carrois Gothic SC' => 'Carrois Gothic SC',
'Carter One' => 'Carter One',
'Caudex' => 'Caudex',
'Cedarville Cursive' => 'Cedarville Cursive',
'Ceviche One' => 'Ceviche One',
'Changa One' => 'Changa One',
'Chango' => 'Chango',
'Chau Philomene One' => 'Chau Philomene One',
'Chela One' => 'Chela One',
'Chelsea Market' => 'Chelsea Market',
'Chenla' => 'Chenla',
'Cherry Cream Soda' => 'Cherry Cream Soda',
'Cherry Swash' => 'Cherry Swash',
'Chewy' => 'Chewy',
'Chicle' => 'Chicle',
'Chivo' => 'Chivo',
'Cinzel' => 'Cinzel',
'Cinzel Decorative' => 'Cinzel Decorative',
'Clicker Script' => 'Clicker Script',
'Coda' => 'Coda',
'Coda Caption' => 'Coda Caption',
'Codystar' => 'Codystar',
'Combo' => 'Combo',
'Comfortaa' => 'Comfortaa',
'Coming Soon' => 'Coming Soon',
'Concert One' => 'Concert One',
'Condiment' => 'Condiment',
'Content' => 'Content',
'Contrail One' => 'Contrail One',
'Convergence' => 'Convergence',
'Cookie' => 'Cookie',
'Copse' => 'Copse',
'Corben' => 'Corben',
'Courgette' => 'Courgette',
'Cousine' => 'Cousine',
'Coustard' => 'Coustard',
'Covered By Your Grace' => 'Covered By Your Grace',
'Crafty Girls' => 'Crafty Girls',
'Creepster' => 'Creepster',
'Crete Round' => 'Crete Round',
'Crimson Text' => 'Crimson Text',
'Croissant One' => 'Croissant One',
'Crushed' => 'Crushed',
'Cuprum' => 'Cuprum',
'Cutive' => 'Cutive',
'Cutive Mono' => 'Cutive Mono',
'Damion' => 'Damion',
'Dancing Script' => 'Dancing Script',
'Dangrek' => 'Dangrek',
'Dawning of a New Day' => 'Dawning of a New Day',
'Days One' => 'Days One',
'Delius' => 'Delius',
'Delius Swash Caps' => 'Delius Swash Caps',
'Delius Unicase' => 'Delius Unicase',
'Della Respira' => 'Della Respira',
'Denk One' => 'Denk One',
'Devonshire' => 'Devonshire',
'Didact Gothic' => 'Didact Gothic',
'Diplomata' => 'Diplomata',
'Diplomata SC' => 'Diplomata SC',
'Domine' => 'Domine',
'Donegal One' => 'Donegal One',
'Doppio One' => 'Doppio One',
'Dorsa' => 'Dorsa',
'Dosis' => 'Dosis',
'Dr Sugiyama' => 'Dr Sugiyama',
'Droid Sans' => 'Droid Sans',
'Droid Sans Mono' => 'Droid Sans Mono',
'Droid Serif' => 'Droid Serif',
'Duru Sans' => 'Duru Sans',
'Dynalight' => 'Dynalight',
'EB Garamond' => 'EB Garamond',
'Eagle Lake' => 'Eagle Lake',
'Eater' => 'Eater',
'Economica' => 'Economica',
'Electrolize' => 'Electrolize',
'Elsie' => 'Elsie',
'Elsie Swash Caps' => 'Elsie Swash Caps',
'Emblema One' => 'Emblema One',
'Emilys Candy' => 'Emilys Candy',
'Engagement' => 'Engagement',
'Englebert' => 'Englebert',
'Enriqueta' => 'Enriqueta',
'Erica One' => 'Erica One',
'Esteban' => 'Esteban',
'Euphoria Script' => 'Euphoria Script',
'Ewert' => 'Ewert',
'Exo' => 'Exo',
'Expletus Sans' => 'Expletus Sans',
'Fanwood Text' => 'Fanwood Text',
'Fascinate' => 'Fascinate',
'Fascinate Inline' => 'Fascinate Inline',
'Faster One' => 'Faster One',
'Fasthand' => 'Fasthand',
'Fauna One' => 'Fauna One',
'Federant' => 'Federant',
'Federo' => 'Federo',
'Felipa' => 'Felipa',
'Fenix' => 'Fenix',
'Finger Paint' => 'Finger Paint',
'Fjalla One' => 'Fjalla One',
'Fjord One' => 'Fjord One',
'Flamenco' => 'Flamenco',
'Flavors' => 'Flavors',
'Fondamento' => 'Fondamento',
'Fontdiner Swanky' => 'Fontdiner Swanky',
'Forum' => 'Forum',
'Francois One' => 'Francois One',
'Freckle Face' => 'Freckle Face',
'Fredericka the Great' => 'Fredericka the Great',
'Fredoka One' => 'Fredoka One',
'Freehand' => 'Freehand',
'Fresca' => 'Fresca',
'Frijole' => 'Frijole',
'Fruktur' => 'Fruktur',
'Fugaz One' => 'Fugaz One',
'GFS Didot' => 'GFS Didot',
'GFS Neohellenic' => 'GFS Neohellenic',
'Gabriela' => 'Gabriela',
'Gafata' => 'Gafata',
'Galdeano' => 'Galdeano',
'Galindo' => 'Galindo',
'Gentium Basic' => 'Gentium Basic',
'Gentium Book Basic' => 'Gentium Book Basic',
'Geo' => 'Geo',
'Geostar' => 'Geostar',
'Geostar Fill' => 'Geostar Fill',
'Germania One' => 'Germania One',
'Gilda Display' => 'Gilda Display',
'Give You Glory' => 'Give You Glory',
'Glass Antiqua' => 'Glass Antiqua',
'Glegoo' => 'Glegoo',
'Gloria Hallelujah' => 'Gloria Hallelujah',
'Goblin One' => 'Goblin One',
'Gochi Hand' => 'Gochi Hand',
'Gorditas' => 'Gorditas',
'Goudy Bookletter 1911' => 'Goudy Bookletter 1911',
'Graduate' => 'Graduate',
'Grand Hotel' => 'Grand Hotel',
'Gravitas One' => 'Gravitas One',
'Great Vibes' => 'Great Vibes',
'Griffy' => 'Griffy',
'Gruppo' => 'Gruppo',
'Gudea' => 'Gudea',
'Habibi' => 'Habibi',
'Hammersmith One' => 'Hammersmith One',
'Hanalei' => 'Hanalei',
'Hanalei Fill' => 'Hanalei Fill',
'Handlee' => 'Handlee',
'Hanuman' => 'Hanuman',
'Happy Monkey' => 'Happy Monkey',
'Headland One' => 'Headland One',
'Henny Penny' => 'Henny Penny',
'Herr Von Muellerhoff' => 'Herr Von Muellerhoff',
'Holtwood One SC' => 'Holtwood One SC',
'Homemade Apple' => 'Homemade Apple',
'Homenaje' => 'Homenaje',
'IM Fell DW Pica' => 'IM Fell DW Pica',
'IM Fell DW Pica SC' => 'IM Fell DW Pica SC',
'IM Fell Double Pica' => 'IM Fell Double Pica',
'IM Fell Double Pica SC' => 'IM Fell Double Pica SC',
'IM Fell English' => 'IM Fell English',
'IM Fell English SC' => 'IM Fell English SC',
'IM Fell French Canon' => 'IM Fell French Canon',
'IM Fell French Canon SC' => 'IM Fell French Canon SC',
'IM Fell Great Primer' => 'IM Fell Great Primer',
'IM Fell Great Primer SC' => 'IM Fell Great Primer SC',
'Iceberg' => 'Iceberg',
'Iceland' => 'Iceland',
'Imprima' => 'Imprima',
'Inconsolata' => 'Inconsolata',
'Inder' => 'Inder',
'Indie Flower' => 'Indie Flower',
'Inika' => 'Inika',
'Irish Grover' => 'Irish Grover',
'Istok Web' => 'Istok Web',
'Italiana' => 'Italiana',
'Italianno' => 'Italianno',
'Jacques Francois' => 'Jacques Francois',
'Jacques Francois Shadow' => 'Jacques Francois Shadow',
'Jim Nightshade' => 'Jim Nightshade',
'Jockey One' => 'Jockey One',
'Jolly Lodger' => 'Jolly Lodger',
'Josefin Sans' => 'Josefin Sans',
'Josefin Slab' => 'Josefin Slab',
'Joti One' => 'Joti One',
'Judson' => 'Judson',
'Julee' => 'Julee',
'Julius Sans One' => 'Julius Sans One',
'Junge' => 'Junge',
'Jura' => 'Jura',
'Just Another Hand' => 'Just Another Hand',
'Just Me Again Down Here' => 'Just Me Again Down Here',
'Kameron' => 'Kameron',
'Karla' => 'Karla',
'Kaushan Script' => 'Kaushan Script',
'Kavoon' => 'Kavoon',
'Keania One' => 'Keania One',
'Kelly Slab' => 'Kelly Slab',
'Kenia' => 'Kenia',
'Khmer' => 'Khmer',
'Kite One' => 'Kite One',
'Knewave' => 'Knewave',
'Kotta One' => 'Kotta One',
'Koulen' => 'Koulen',
'Kranky' => 'Kranky',
'Kreon' => 'Kreon',
'Kristi' => 'Kristi',
'Krona One' => 'Krona One',
'La Belle Aurore' => 'La Belle Aurore',
'Lancelot' => 'Lancelot',
'Lato' => 'Lato',
'League Script' => 'League Script',
'Leckerli One' => 'Leckerli One',
'Ledger' => 'Ledger',
'Lekton' => 'Lekton',
'Lemon' => 'Lemon',
'Libre Baskerville' => 'Libre Baskerville',
'Life Savers' => 'Life Savers',
'Lilita One' => 'Lilita One',
'Lily Script One' => 'Lily Script One',
'Limelight' => 'Limelight',
'Linden Hill' => 'Linden Hill',
'Lobster' => 'Lobster',
'Lobster Two' => 'Lobster Two',
'Londrina Outline' => 'Londrina Outline',
'Londrina Shadow' => 'Londrina Shadow',
'Londrina Sketch' => 'Londrina Sketch',
'Londrina Solid' => 'Londrina Solid',
'Lora' => 'Lora',
'Love Ya Like A Sister' => 'Love Ya Like A Sister',
'Loved by the King' => 'Loved by the King',
'Lovers Quarrel' => 'Lovers Quarrel',
'Luckiest Guy' => 'Luckiest Guy',
'Lusitana' => 'Lusitana',
'Lustria' => 'Lustria',
'Macondo' => 'Macondo',
'Macondo Swash Caps' => 'Macondo Swash Caps',
'Magra' => 'Magra',
'Maiden Orange' => 'Maiden Orange',
'Mako' => 'Mako',
'Marcellus' => 'Marcellus',
'Marcellus SC' => 'Marcellus SC',
'Marck Script' => 'Marck Script',
'Margarine' => 'Margarine',
'Marko One' => 'Marko One',
'Marmelad' => 'Marmelad',
'Marvel' => 'Marvel',
'Mate' => 'Mate',
'Mate SC' => 'Mate SC',
'Maven Pro' => 'Maven Pro',
'McLaren' => 'McLaren',
'Meddon' => 'Meddon',
'MedievalSharp' => 'MedievalSharp',
'Medula One' => 'Medula One',
'Megrim' => 'Megrim',
'Meie Script' => 'Meie Script',
'Merienda' => 'Merienda',
'Merienda One' => 'Merienda One',
'Merriweather' => 'Merriweather',
'Merriweather Sans' => 'Merriweather Sans',
'Metal' => 'Metal',
'Metal Mania' => 'Metal Mania',
'Metamorphous' => 'Metamorphous',
'Metrophobic' => 'Metrophobic',
'Michroma' => 'Michroma',
'Milonga' => 'Milonga',
'Miltonian' => 'Miltonian',
'Miltonian Tattoo' => 'Miltonian Tattoo',
'Miniver' => 'Miniver',
'Miss Fajardose' => 'Miss Fajardose',
'Modern Antiqua' => 'Modern Antiqua',
'Molengo' => 'Molengo',
'Molle' => 'Molle',
'Monda' => 'Monda',
'Monofett' => 'Monofett',
'Monoton' => 'Monoton',
'Monsieur La Doulaise' => 'Monsieur La Doulaise',
'Montaga' => 'Montaga',
'Montez' => 'Montez',
'Montserrat' => 'Montserrat',
'Montserrat Alternates' => 'Montserrat Alternates',
'Montserrat Subrayada' => 'Montserrat Subrayada',
'Moul' => 'Moul',
'Moulpali' => 'Moulpali',
'Mountains of Christmas' => 'Mountains of Christmas',
'Mouse Memoirs' => 'Mouse Memoirs',
'Mr Bedfort' => 'Mr Bedfort',
'Mr Dafoe' => 'Mr Dafoe',
'Mr De Haviland' => 'Mr De Haviland',
'Mrs Saint Delafield' => 'Mrs Saint Delafield',
'Mrs Sheppards' => 'Mrs Sheppards',
'Muli' => 'Muli',
'Mystery Quest' => 'Mystery Quest',
'Neucha' => 'Neucha',
'Neuton' => 'Neuton',
'New Rocker' => 'New Rocker',
'News Cycle' => 'News Cycle',
'Niconne' => 'Niconne',
'Nixie One' => 'Nixie One',
'Nobile' => 'Nobile',
'Nokora' => 'Nokora',
'Norican' => 'Norican',
'Nosifer' => 'Nosifer',
'Nothing You Could Do' => 'Nothing You Could Do',
'Noticia Text' => 'Noticia Text',
'Noto Sans' => 'Noto Sans',
'Noto Serif' => 'Noto Serif',
'Nova Cut' => 'Nova Cut',
'Nova Flat' => 'Nova Flat',
'Nova Mono' => 'Nova Mono',
'Nova Oval' => 'Nova Oval',
'Nova Round' => 'Nova Round',
'Nova Script' => 'Nova Script',
'Nova Slim' => 'Nova Slim',
'Nova Square' => 'Nova Square',
'Numans' => 'Numans',
'Nunito' => 'Nunito',
'Odor Mean Chey' => 'Odor Mean Chey',
'Offside' => 'Offside',
'Old Standard TT' => 'Old Standard TT',
'Oldenburg' => 'Oldenburg',
'Oleo Script' => 'Oleo Script',
'Oleo Script Swash Caps' => 'Oleo Script Swash Caps',
'Open Sans' => 'Open Sans',
'Open Sans Condensed' => 'Open Sans Condensed',
'Oranienbaum' => 'Oranienbaum',
'Orbitron' => 'Orbitron',
'Oregano' => 'Oregano',
'Orienta' => 'Orienta',
'Original Surfer' => 'Original Surfer',
'Oswald' => 'Oswald',
'Over the Rainbow' => 'Over the Rainbow',
'Overlock' => 'Overlock',
'Overlock SC' => 'Overlock SC',
'Ovo' => 'Ovo',
'Oxygen' => 'Oxygen',
'Oxygen Mono' => 'Oxygen Mono',
'PT Mono' => 'PT Mono',
'PT Sans' => 'PT Sans',
'PT Sans Caption' => 'PT Sans Caption',
'PT Sans Narrow' => 'PT Sans Narrow',
'PT Serif' => 'PT Serif',
'PT Serif Caption' => 'PT Serif Caption',
'Pacifico' => 'Pacifico',
'Paprika' => 'Paprika',
'Parisienne' => 'Parisienne',
'Passero One' => 'Passero One',
'Passion One' => 'Passion One',
'Pathway Gothic One' => 'Pathway Gothic One',
'Patrick Hand' => 'Patrick Hand',
'Patrick Hand SC' => 'Patrick Hand SC',
'Patua One' => 'Patua One',
'Paytone One' => 'Paytone One',
'Peralta' => 'Peralta',
'Permanent Marker' => 'Permanent Marker',
'Petit Formal Script' => 'Petit Formal Script',
'Petrona' => 'Petrona',
'Philosopher' => 'Philosopher',
'Piedra' => 'Piedra',
'Pinyon Script' => 'Pinyon Script',
'Pirata One' => 'Pirata One',
'Plaster' => 'Plaster',
'Play' => 'Play',
'Playball' => 'Playball',
'Playfair Display' => 'Playfair Display',
'Playfair Display SC' => 'Playfair Display SC',
'Podkova' => 'Podkova',
'Poiret One' => 'Poiret One',
'Poller One' => 'Poller One',
'Poly' => 'Poly',
'Pompiere' => 'Pompiere',
'Pontano Sans' => 'Pontano Sans',
'Port Lligat Sans' => 'Port Lligat Sans',
'Port Lligat Slab' => 'Port Lligat Slab',
'Prata' => 'Prata',
'Preahvihear' => 'Preahvihear',
'Press Start 2P' => 'Press Start 2P',
'Princess Sofia' => 'Princess Sofia',
'Prociono' => 'Prociono',
'Prosto One' => 'Prosto One',
'Puritan' => 'Puritan',
'Purple Purse' => 'Purple Purse',
'Quando' => 'Quando',
'Quantico' => 'Quantico',
'Quattrocento' => 'Quattrocento',
'Quattrocento Sans' => 'Quattrocento Sans',
'Questrial' => 'Questrial',
'Quicksand' => 'Quicksand',
'Quintessential' => 'Quintessential',
'Qwigley' => 'Qwigley',
'Racing Sans One' => 'Racing Sans One',
'Radley' => 'Radley',
'Raleway' => 'Raleway',
'Raleway Dots' => 'Raleway Dots',
'Rambla' => 'Rambla',
'Rammetto One' => 'Rammetto One',
'Ranchers' => 'Ranchers',
'Rancho' => 'Rancho',
'Rationale' => 'Rationale',
'Redressed' => 'Redressed',
'Reenie Beanie' => 'Reenie Beanie',
'Revalia' => 'Revalia',
'Ribeye' => 'Ribeye',
'Ribeye Marrow' => 'Ribeye Marrow',
'Righteous' => 'Righteous',
'Risque' => 'Risque',
'Roboto' => 'Roboto',
'Roboto Condensed' => 'Roboto Condensed',
'Roboto Slab' => 'Roboto Slab',
'Rochester' => 'Rochester',
'Rock Salt' => 'Rock Salt',
'Rokkitt' => 'Rokkitt',
'Romanesco' => 'Romanesco',
'Ropa Sans' => 'Ropa Sans',
'Rosario' => 'Rosario',
'Rosarivo' => 'Rosarivo',
'Rouge Script' => 'Rouge Script',
'Ruda' => 'Ruda',
'Rufina' => 'Rufina',
'Ruge Boogie' => 'Ruge Boogie',
'Ruluko' => 'Ruluko',
'Rum Raisin' => 'Rum Raisin',
'Ruslan Display' => 'Ruslan Display',
'Russo One' => 'Russo One',
'Ruthie' => 'Ruthie',
'Rye' => 'Rye',
'Sacramento' => 'Sacramento',
'Sail' => 'Sail',
'Salsa' => 'Salsa',
'Sanchez' => 'Sanchez',
'Sancreek' => 'Sancreek',
'Sansita One' => 'Sansita One',
'Sarina' => 'Sarina',
'Satisfy' => 'Satisfy',
'Scada' => 'Scada',
'Schoolbell' => 'Schoolbell',
'Seaweed Script' => 'Seaweed Script',
'Sevillana' => 'Sevillana',
'Seymour One' => 'Seymour One',
'Shadows Into Light' => 'Shadows Into Light',
'Shadows Into Light Two' => 'Shadows Into Light Two',
'Shanti' => 'Shanti',
'Share' => 'Share',
'Share Tech' => 'Share Tech',
'Share Tech Mono' => 'Share Tech Mono',
'Shojumaru' => 'Shojumaru',
'Short Stack' => 'Short Stack',
'Siemreap' => 'Siemreap',
'Sigmar One' => 'Sigmar One',
'Signika' => 'Signika',
'Signika Negative' => 'Signika Negative',
'Simonetta' => 'Simonetta',
'Sintony' => 'Sintony',
'Sirin Stencil' => 'Sirin Stencil',
'Six Caps' => 'Six Caps',
'Skranji' => 'Skranji',
'Slackey' => 'Slackey',
'Smokum' => 'Smokum',
'Smythe' => 'Smythe',
'Sniglet' => 'Sniglet',
'Snippet' => 'Snippet',
'Snowburst One' => 'Snowburst One',
'Sofadi One' => 'Sofadi One',
'Sofia' => 'Sofia',
'Sonsie One' => 'Sonsie One',
'Sorts Mill Goudy' => 'Sorts Mill Goudy',
'Source Code Pro' => 'Source Code Pro',
'Source Sans Pro' => 'Source Sans Pro',
'Special Elite' => 'Special Elite',
'Spicy Rice' => 'Spicy Rice',
'Spinnaker' => 'Spinnaker',
'Spirax' => 'Spirax',
'Squada One' => 'Squada One',
'Stalemate' => 'Stalemate',
'Stalinist One' => 'Stalinist One',
'Stardos Stencil' => 'Stardos Stencil',
'Stint Ultra Condensed' => 'Stint Ultra Condensed',
'Stint Ultra Expanded' => 'Stint Ultra Expanded',
'Stoke' => 'Stoke',
'Strait' => 'Strait',
'Sue Ellen Francisco' => 'Sue Ellen Francisco',
'Sunshiney' => 'Sunshiney',
'Supermercado One' => 'Supermercado One',
'Suwannaphum' => 'Suwannaphum',
'Swanky and Moo Moo' => 'Swanky and Moo Moo',
'Syncopate' => 'Syncopate',
'Tangerine' => 'Tangerine',
'Taprom' => 'Taprom',
'Tauri' => 'Tauri',
'Telex' => 'Telex',
'Tenor Sans' => 'Tenor Sans',
'Text Me One' => 'Text Me One',
'The Girl Next Door' => 'The Girl Next Door',
'Tienne' => 'Tienne',
'Tinos' => 'Tinos',
'Titan One' => 'Titan One',
'Titillium Web' => 'Titillium Web',
'Trade Winds' => 'Trade Winds',
'Trocchi' => 'Trocchi',
'Trochut' => 'Trochut',
'Trykker' => 'Trykker',
'Tulpen One' => 'Tulpen One',
'Ubuntu' => 'Ubuntu',
'Ubuntu Condensed' => 'Ubuntu Condensed',
'Ubuntu Mono' => 'Ubuntu Mono',
'Ultra' => 'Ultra',
'Uncial Antiqua' => 'Uncial Antiqua',
'Underdog' => 'Underdog',
'Unica One' => 'Unica One',
'UnifrakturCook' => 'UnifrakturCook',
'UnifrakturMaguntia' => 'UnifrakturMaguntia',
'Unkempt' => 'Unkempt',
'Unlock' => 'Unlock',
'Unna' => 'Unna',
'VT323' => 'VT323',
'Vampiro One' => 'Vampiro One',
'Varela' => 'Varela',
'Varela Round' => 'Varela Round',
'Vast Shadow' => 'Vast Shadow',
'Vibur' => 'Vibur',
'Vidaloka' => 'Vidaloka',
'Viga' => 'Viga',
'Voces' => 'Voces',
'Volkhov' => 'Volkhov',
'Vollkorn' => 'Vollkorn',
'Voltaire' => 'Voltaire',
'Waiting for the Sunrise' => 'Waiting for the Sunrise',
'Wallpoet' => 'Wallpoet',
'Walter Turncoat' => 'Walter Turncoat',
'Warnes' => 'Warnes',
'Wellfleet' => 'Wellfleet',
'Wendy One' => 'Wendy One',
'Wire One' => 'Wire One',
'Yanone Kaffeesatz' => 'Yanone Kaffeesatz',
'Yellowtail' => 'Yellowtail',
'Yeseva One' => 'Yeseva One',
'Yesteryear' => 'Yesteryear',
'Zeyada' => 'Zeyada'
);
$wp_customize->add_section('fonts_section', array(
'title'=> __( 'Fonts Options', 'coffee' ),
'priority' => 1000
));
$wp_customize->add_setting('body_font', array(
'default' => 'Droid Sans',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('body_font',
array(
'label'=> __('Body font', 'coffee'),
'section'=> 'fonts_section',
'settings' => 'body_font',
'type' => 'select',
'choices' => $fonts_array,
'priority' => 10
)
);
$wp_customize->add_setting('heading_font', array(
'default' => 'Montserrat',
'type' => 'option',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
));
$wp_customize->add_control('heading_font',
array(
'label'=> __('Headings font', 'coffee'),
'section'=> 'fonts_section',
'settings' => 'heading_font',
'type' => 'select',
'choices' => $fonts_array,
'priority' => 20
)
);
}
// adding classes for jquery to body
add_filter('body_class', 'coffee_body_classes');
function coffee_body_classes($classes){
if(get_option('nicescroll_switch', true)){
$classes[] = 'nicescroll';
}
if(get_option('header_switch', true)){
$classes[] = 'parallax-on';
}
return $classes;
}
// home template carousel functions
function coffee_carousel($id = '1', $title = 'Recent Projects', $post_type = 'portfolio-type', $post_number = -1, $post_exclude = array()){
// reseting wp query before carousel
wp_reset_query();
echo('<div id="'.$id.'-carousel-wrapper" class="carousel-wrapper '.$post_type.' content-column-wrapper clearfix"><div class="content-column clearfix">');
?>
<script type="text/javascript">
jQuery(window).ready(function(){
jQuery("#<?php echo($id); ?>-carousel-wrapper ul.carousel-items").imagesLoaded(function() {
jQuery(this).carouFredSel({
responsive : true,
height: 'variable',
items : {
width: 300,
visible : {
min : 1,
max : 4
}
},
scroll : {
fx: 'scroll',
easing: "easeInOutCubic",
duration: "800",
pauseOnHover: true
},
swipe: {
onTouch: !0,
},
prev:{
button: jQuery("#<?php echo($id); ?>-carousel-wrapper .carousel-controls .carousel-prev")
},
next:{
button: jQuery("#<?php echo($id); ?>-carousel-wrapper .carousel-controls .carousel-next")
},
auto:{play:!1}
});
});
});
</script>
<?php
echo('<div class="carousel-title-wrapper"><h3 class="carousel-title heading-font">'.$title.'</h3><div class="carousel-controls"><a class="carousel-prev"><i class="icon-chevron-left"></i></a><a class="carousel-next"><i class="icon-chevron-right"></i></a></div></div>');
echo('<div class="carousel-items-wrapper"><ul class="carousel-items clearfix">');
$carousel_query = new WP_Query( array( 'post_type' => $post_type, 'posts_per_page'=> $post_number, 'post__not_in' => $post_exclude ));
while ( $carousel_query -> have_posts() ) : $carousel_query -> the_post();
echo('<li class="carousel-item clearfix">');
if($post_type == 'portfolio-type'){
get_template_part( 'portfolio-format/grid' );
} elseif($post_type == 'team-type'){
get_template_part( 'team-format/grid' );
} else {
$format = get_post_format();
get_template_part( 'post-format/grid/'.$format );
if($format == '') get_template_part( 'post-format/grid/standard' );
}
echo('</li>');
endwhile;
echo('</ul></div></div></div>');
// reseting wp query after carousel
wp_reset_query();
}
// DISABLE USE OF XML-RPC
add_filter( 'xmlrpc_enabled', '__return_false' );
// Disable X-Pingback to header
function jh_disable_x_pingback( $headers ) {
unset( $headers['X-Pingback'] );
return $headers;
}
add_filter( 'wp_headers', 'jh_disable_x_pingback' );
?>
ACC SHELL 2018