__( 'Primary Menu', 'boxy' ),
) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'boxy_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
// Enable support for Post Formats.
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link',
) );
add_theme_support( 'custom-background' );
add_theme_support( 'custom-logo' );
// Add theme support for Semantic Markup
$markup = array( 'search-form', 'comment-form', 'comment-list', );
add_theme_support( 'html5', $markup );
// Add theme support for title tag
add_theme_support( 'title-tag' );
/*
* Add Additional image sizes
*
*/
if( get_theme_mod('image_crop_mode') == 'soft' ) {
add_image_size( 'boxy_recent-post-img', 380, 350);
add_image_size( 'boxy_service-img', 100, 100);
add_image_size( 'boxy-blog-full-width', 1200,350);
add_image_size( 'boxy-small-featured-image-width', 450,300);
add_image_size( 'boxy-blog-large-width', 800,300);
add_image_size( 'boxy-rpgallery', 250, 200);
}else {
add_image_size( 'boxy_recent-post-img', 380, 350, true);
add_image_size( 'boxy_service-img', 100, 100, true);
add_image_size( 'boxy-blog-full-width', 1200,350, true );
add_image_size( 'boxy-small-featured-image-width', 450,300, true );
add_image_size( 'boxy-blog-large-width', 800,300, true );
add_image_size( 'boxy-rpgallery', 250, 200, true );
}
}
endif; // boxy_setup
add_action( 'after_setup_theme', 'boxy_setup' );
add_action( 'after_setup_theme', 'boxy_customizer_setup',11 );
if( ! function_exists( 'boxy_customizer_setup' ) ) {
//echo '
';
}
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end' );
add_action( 'woocommerce_after_main_content', 'boxy_output_content_wrapper_end' );
function boxy_output_content_wrapper_end () {
echo "
";
}
add_action( 'init', 'boxy_remove_wc_breadcrumbs' );
function boxy_remove_wc_breadcrumbs() {
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
}
// Blog image size cropping ( Select Crop or Hard )
if( !function_exists('boxy_image_size_crop_option') ) {
function boxy_image_size_crop_option() {
$ver = get_theme_mod( 'version', false );
// Return if update has already been run
if ( version_compare( $ver, '1.2.6' ) >= 0 ) {
if( ! get_theme_mod('image_crop_mode') ) {
set_theme_mod('image_crop_mode','soft');
}
return;
}
if( ! get_theme_mod('image_crop_mode') ) {
set_theme_mod('image_crop_mode','hard');
}
// Update to match your current theme version
set_theme_mod( 'version', '1.2.6' );
}
}
add_action( 'after_setup_theme', 'boxy_image_size_crop_option' );