<?php
/**
* Custom Hooks
*
* @package FreshWP 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 freshwp_before_header() {
    do_action('freshwp_before_header');
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

if ( !(freshwp_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' );
}