<?php
/**
* Custom Hooks
*
* @package BoldWP WordPress Theme
* @copyright Copyright (C) 2025 ThemesDNA
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
* @author ThemesDNA <themesdna@gmail.com>
*/

function boldwp_before_header() {
    do_action('boldwp_before_header');
}

function boldwp_after_header() {
    do_action('boldwp_after_header');
}

function boldwp_before_main_content() {
    do_action('boldwp_before_main_content');
}
add_action('boldwp_before_main_content', 'boldwp_top_widgets', 20 );

function boldwp_after_main_content() {
    do_action('boldwp_after_main_content');
}
add_action('boldwp_after_main_content', 'boldwp_bottom_widgets', 10 );

function boldwp_sidebar_one() {
    do_action('boldwp_sidebar_one');
}
add_action('boldwp_sidebar_one', 'boldwp_sidebar_one_widgets', 10 );

function boldwp_before_single_post() {
    do_action('boldwp_before_single_post');
}

function boldwp_before_single_post_title() {
    do_action('boldwp_before_single_post_title');
}

function boldwp_after_single_post_title() {
    do_action('boldwp_after_single_post_title');
}

function boldwp_after_single_post_content() {
    do_action('boldwp_after_single_post_content');
}

function boldwp_after_single_post() {
    do_action('boldwp_after_single_post');
}

function boldwp_before_single_page() {
    do_action('boldwp_before_single_page');
}

function boldwp_before_single_page_title() {
    do_action('boldwp_before_single_page_title');
}

function boldwp_after_single_page_title() {
    do_action('boldwp_after_single_page_title');
}

function boldwp_after_single_page_content() {
    do_action('boldwp_after_single_page_content');
}

function boldwp_after_single_page() {
    do_action('boldwp_after_single_page');
}

function boldwp_before_comments() {
    do_action('boldwp_before_comments');
}

function boldwp_after_comments() {
    do_action('boldwp_after_comments');
}

function boldwp_before_footer() {
    do_action('boldwp_before_footer');
}

function boldwp_after_footer() {
    do_action('boldwp_after_footer');
}

if ( !(boldwp_get_option('enable_widgets_block_editor')) ) {
    // Disables the block editor from managing widgets in the Gutenberg plugin.
    add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 );

    // Disables the block editor from managing widgets.
    add_filter( 'use_widgets_block_editor', '__return_false' );
}

if ( ! function_exists( 'boldwp_remove_theme_support' ) ) :
function boldwp_remove_theme_support() {

    if ( boldwp_is_fitvids_active() ) {
        // Remove responsive embedded content support.
        remove_theme_support( 'responsive-embeds' );
    }

}
endif;
add_action( 'after_setup_theme', 'boldwp_remove_theme_support', 1000 );