File: /home/zeusxp5/chuair.org/wp-content/themes/lifttruck/inc/theme-support.php
<?php
/**
* Register theme support for languages, menus, post-thumbnails, post-formats etc.
*
*/
if ( ! function_exists( 'lifttruck_theme_support' ) ) {
function lifttruck_theme_support() {
load_theme_textdomain('lifttruck', get_template_directory() . '/languages');
add_theme_support( 'block-templates' );
add_theme_support( 'block-template-parts' );
// Remove <p> and <br/> from Contact Form 7
add_filter('wpcf7_autop_or_not', '__return_false');
register_block_pattern_category(
'Pages',
[
'label' => esc_html__( 'Pages', 'lifttruck' ),
]
);
register_block_pattern_category(
'featured-sections',
[
'label' => esc_html__( 'Featured sections', 'lifttruck' ),
]
);
register_block_pattern_category(
'faq-sections',
[
'label' => esc_html__( 'FAQ', 'lifttruck' ),
]
);
register_block_pattern_category(
'product-categories-sections',
[
'label' => esc_html__( 'Product categories', 'lifttruck' ),
]
);
register_block_pattern_category(
'logos-sections',
[
'label' => esc_html__( 'Logos', 'lifttruck' ),
]
);
register_block_pattern_category(
'media-text-sections',
[
'label' => esc_html__( 'Media & Text', 'lifttruck' ),
]
);
register_block_pattern_category(
'blog-sections',
[
'label' => esc_html__( 'Blog Sections', 'lifttruck' ),
]
);
register_block_pattern_category(
'products-sections',
[
'label' => esc_html__( 'Products', 'lifttruck' ),
]
);
}
add_action('after_setup_theme', 'lifttruck_theme_support');
}
add_action( 'customize_register', '__return_true' );
add_action('init', function() {
remove_theme_support('core-block-patterns');
});
//add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );
//----------- stop WooCommerce from redirecting the user to the welcome screen ---------------
add_filter( 'woocommerce_enable_setup_wizard', '__return_false' );