slug, $hidden_template_slugs, true ); } ) ); } endif; add_filter( 'get_block_templates', 'purple_hide_store_templates_from_template_picker', 20, 3 ); if ( ! function_exists( 'purple_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * @since purple 1.0 * * @return void */ function purple_setup() { // Enqueue editor styles. add_editor_style( 'style.css' ); } endif; add_action( 'after_setup_theme', 'purple_setup' ); if ( ! function_exists( 'purple_register_pattern_categories' ) ) : /** * Register the "Purple" block pattern category so the theme's * internally-used patterns can be grouped together in the inserter. */ function purple_register_pattern_categories() { register_block_pattern_category( 'purple', array( 'label' => __( 'Purple', 'purple' ) ) ); } endif; add_action( 'init', 'purple_register_pattern_categories' ); if ( ! function_exists( 'purple_styles' ) ) : /** * Enqueue styles. * * @since purple 1.0 * * @return void */ function purple_styles() { // Register theme stylesheet. Use the template (parent) directory and // version so the file still resolves when a child theme is active. wp_register_style( 'purple-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme( get_template() )->get( 'Version' ) ); // Enqueue theme stylesheet. wp_enqueue_style( 'purple-style' ); } endif; add_action( 'wp_enqueue_scripts', 'purple_styles' ); if ( ! function_exists( 'purple_remove_upsells' ) ) : /** * Remove upsells from product description. * * @since purple 1.0 * * @return void */ function purple_remove_upsells() { remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); } endif; add_action( 'init', 'purple_remove_upsells' );