'Welcart e-Commerce',
'slug' => 'usc-e-shop',
'required' => false,
),
);
$config = array(
'default_path' => '',
'menu' => 'tgmpa-install-plugins',
'has_notices' => true,
'dismissable' => true,
'dismiss_msg' => '',
'is_automatic' => false,
'message' => '',
'strings' => array(
'page_title' => __( 'Install Recommended Plugins', 'blanc' ),
'menu_title' => __( 'Install Plugins', 'blanc' ),
'installing' => __( 'Installing Plugin: %s', 'blanc' ),
'oops' => __( 'Something went wrong with the plugin API.', 'blanc' ),
'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'blanc' ),
'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'blanc' ),
'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'blanc' ),
'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'blanc' ),
'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'blanc' ),
'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'blanc' ),
'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'blanc' ),
'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'blanc' ),
'return' => __( 'Return to Recommended Plugins Installer', 'blanc' ),
'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ),
'complete' => __( 'All plugins installed and activated successfully. %s', 'blanc' ),
'nag_type' => 'updated'
)
);
tgmpa( $plugins, $config );
}
//Translation
load_theme_textdomain( 'blanc', get_template_directory() . '/languages' );
//Editor style
add_editor_style();
//Remove generator
remove_action('wp_head', 'wp_generator');
//Search form
add_theme_support('html5', array('search-form'));
//Navigation menu
register_nav_menu('navigation',__( 'Navigation', 'blanc' ));
//Content width
if ( !isset( $content_width ) ){
$content_width = 720;
}
//Feed
add_theme_support( 'automatic-feed-links' );
//Scripts and Style sheets
function blanc_scripts(){
wp_enqueue_style( 'foundation-style', get_template_directory_uri() .'/css/foundation.min.css');
wp_enqueue_style( 'blanc-style', get_stylesheet_uri() );
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css');
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Quicksand');
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/vendor/modernizr.js', array(), '', true);
wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array(), '1.0', true);
if( is_single() && in_category( 'blog' ) &&comments_open() ){
wp_enqueue_script('comment-reply');
}
if ( is_front_page() || ( is_single() && in_category('item') ) ){
wp_enqueue_style( 'flexslider-css', get_template_directory_uri() . '/css/flexslider.css');
wp_enqueue_script( 'flexslider-js', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array(), '2.2.2', true);
if ( is_front_page() ){
wp_enqueue_script( 'use-flexslider-home', get_template_directory_uri() . '/js/use-flexslider-home.js', array(), '1.0', true);
}
}
if( is_single() ){
wp_enqueue_style( 'swipebox-style', get_template_directory_uri() .'/css/swipebox.min.css', 'all');
wp_enqueue_script( 'swipebox', get_template_directory_uri() . '/js/jquery.swipebox.min.js', array(), '1.2.9', true);
wp_enqueue_script( 'use-swipebox', get_template_directory_uri() . '/js/use-swipebox.js', array(), '1.0', true);
if( in_category( 'item' ) ){
wp_enqueue_script( 'use-flexslider-single', get_template_directory_uri() . '/js/use-flexslider-single.js', array(), '1.0', true);
wp_enqueue_script( 'script-qty', get_template_directory_uri() . '/js/script-qty.js', array(), '1.0', true);
}
}
if( is_page(array('usces-cart','usces-member'))){
wp_enqueue_style( 'validationEngine-css', get_template_directory_uri() .'/css/validationEngine.jquery.css', 'all');
wp_enqueue_script( 'validationEngine', get_template_directory_uri() . '/js/jquery.validationEngine.js', array(), '2.6.2', true);
wp_enqueue_script( 'validationEngine-lang', get_template_directory_uri() . '/js/jquery.validationEngine-en.js', array(), '2.0', true);
wp_enqueue_script( 'use-validationEngine', get_template_directory_uri() . '/js/use-validationEngine.js', array(), '1.0', true);
}
}
add_action( 'wp_enqueue_scripts', 'blanc_scripts');
//Length of excerpt
function blanc_length($length){
if(!wp_is_mobile()){
return 70;
} else {
return 35;
}
}
add_filter( 'excerpt_mblength', 'blanc_length' );
//Excerpt more
function blanc_more($more){
return '…';
}
add_filter( 'excerpt_more', 'blanc_more');
//Featured image
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150, true );
//Fixing problem of title tag of multiple item category search page & date archives
add_filter( 'wp_title', 'blanc_wp_title', 10, 2 );
function blanc_wp_title($title, $sep){
$sep = ' – ';
if( is_day() ){
$date = __('F jS, Y', 'blanc');
$title = sprintf(__("Posts on %s", "blanc"), get_the_date( $date ) ) . $sep;
} elseif( is_month() ){
$month = __('F Y', 'blanc');
$title = sprintf(__("Posts in %s", "blanc"), get_the_date( $month ) ) . $sep;
} elseif( is_year() ){
$year = __('Y', 'blanc');
$title = sprintf(__("Posts in %s", "blanc"), get_the_date( $year ) ) . $sep;
} elseif ( is_front_page() ){
$title = bloginfo('description') . $sep;
} elseif ( is_search() ){
$s_word = get_search_query();
$title = sprintf(__("Results for '%s'", "blanc"), $s_word ) . $sep;
}
if ( is_paged() ){
$title .= 'page' . get_query_var('paged') . $sep;
}
return $title;
}
//Breadcrumb for blog posts
function blanc_breadcrumb() {
global $post;
$front_page = get_option('page_on_front');
$home = get_option('page_for_posts');
$str ='';
if(!is_admin()){
$str.= '