<?php

if (!defined('ABSPATH')) {
    exit;
}

function backpro_news_setup(): void
{
    add_theme_support('title-tag');
    add_theme_support('post-thumbnails');
    add_theme_support('html5', ['search-form', 'comment-form', 'comment-list', 'gallery', 'caption']);
}
add_action('after_setup_theme', 'backpro_news_setup');

function backpro_news_enqueue_assets(): void
{
    wp_enqueue_style(
        'backpro-news-style',
        get_stylesheet_uri(),
        [],
        wp_get_theme()->get('Version')
    );
}
add_action('wp_enqueue_scripts', 'backpro_news_enqueue_assets');

function backpro_news_parent_categories(): array
{
    return get_categories([
        'taxonomy' => 'category',
        'hide_empty' => true,
        'parent' => 0,
        'orderby' => 'name',
        'order' => 'ASC',
    ]);
}

