';
}
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' );
/* Recommended plugin using TGM */
add_action( 'tgmpa_register', 'boxy_register_plugins');
if( !function_exists('boxy_register_plugins') ) {
function boxy_register_plugins() {
/**
* Array of plugin arrays. Required keys are name and slug.
* If the source is NOT from the .org repo, then source is also required.
*/
$plugins = array(
array(
'name' => 'WPForms Lite', // The plugin name.
'slug' => 'wpforms-lite', // The plugin slug (typically the folder name).
'required' => false, // If false, the plugin is only 'recommended' instead of required.
),
);
/*
* Array of configuration settings. Amend each line as needed.
*
* TGMPA will start providing localized text strings soon. If you already have translations of our standard
* strings available, please help us make TGMPA even better by giving us access to these translations or by
* sending in a pull-request with .po file(s) with the translations.
*
* Only uncomment the strings in the config array if you want to customize the strings.
*/
$config = array(
'id' => 'tgmpa',
// Unique ID for hashing notices for multiple instances of TGMPA.
'default_path' => '',
// Default absolute path to bundled plugins.
'menu' => 'tgmpa-install-plugins',
// Menu slug.
'parent_slug' => 'themes.php',
// Parent menu slug.
'capability' => 'edit_theme_options',
// Capability needed to view plugin install page, should be a capability associated with the parent menu used.
'has_notices' => true,
// Show admin notices or not.
'dismissable' => true,
// If false, a user cannot dismiss the nag message.
'dismiss_msg' => '',
// If 'dismissable' is false, this message will be output at top of nag.
'is_automatic' => false,
// Automatically activate plugins after installation or not.
'message' => '',
// Message to output right before the plugins table.
);
tgmpa( $plugins, $config );
}
}