<?php
/**
 * Theme supports, menus, image sizes.
 *
 * @package Foliora
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Register theme features.
 */
function foliora_setup() {
	add_theme_support( 'title-tag' );
	add_theme_support( 'post-thumbnails' );
	add_theme_support(
		'custom-logo',
		array(
			'height'      => 72,
			'width'       => 220,
			'flex-height' => true,
			'flex-width'  => true,
		)
	);
	add_theme_support(
		'html5',
		array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script' )
	);
	add_theme_support( 'woocommerce' );

	register_nav_menus(
		array(
			'primary'            => __( 'Primary', 'foliora' ),
			'footer-shop'        => __( 'Footer Shop', 'foliora' ),
			'footer-collections' => __( 'Footer Collections', 'foliora' ),
			'footer-help'        => __( 'Footer Help', 'foliora' ),
			'footer-brand'       => __( 'Footer Foliora', 'foliora' ),
		)
	);

	add_image_size( 'foliora-card', 800, 1000, true );
	add_image_size( 'foliora-reel', 720, 1280, true );
	add_image_size( 'foliora-hero', 1200, 1500, true );
}
add_action( 'after_setup_theme', 'foliora_setup' );

/**
 * Body classes.
 *
 * @param string[] $classes Classes.
 * @return string[]
 */
function foliora_body_class( $classes ) {
	$classes[] = 'foliora';
	return $classes;
}
add_filter( 'body_class', 'foliora_body_class' );
