<?php
/**
 * Astra Child Theme functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package Astra Child
 * @since 1.0.0
 */

/**
 * Define Constants
 */
define( 'CHILD_THEME_ASTRA_CHILD_VERSION', '1.0.0' );

/**
 * Enqueue styles
 */
function child_enqueue_styles() {

	wp_enqueue_style( 'astra-child-theme-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), CHILD_THEME_ASTRA_CHILD_VERSION, 'all' );

}

add_action( 'wp_enqueue_scripts', 'child_enqueue_styles', 15 );

/** 
 * Disable title on all post types. 
 */ 
function your_prefix_post_title() { 
 $post_types = array('page','post'); 

 // bail early if the current post type if not the one we want to customize. 
 if ( ! in_array( get_post_type(), $post_types ) ) { return; } 

 // Disable title. 
 add_filter( 'astra_the_title_enabled', '__return_false' ); 
}

add_action( 'wp', 'remove_astra_header_callback');
function remove_astra_header_callback(){
remove_action( 'astra_header', 'astra_header_markup' );
}
add_filter( 'tribe_events_event_schedule_details_formatting', 'tribe_custom_event_view' );
function tribe_custom_event_view( $settings ) {
    // Show only event name and inclusive dates
    $settings['show_start_time'] = false;
    $settings['show_end_time'] = false;
    $settings['show_date'] = true; // Adjust as needed
    return $settings;
}