<?php
function my_child_theme_enqueue_styles() {
    wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
    wp_enqueue_style('child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array('parent-style')
    );
}


// Redirect users away from wp-login.php and wp-admin to a custom 404 page
function custom_login_redirect($redirect_to, $request, $user) {
    if (strpos($_SERVER['REQUEST_URI'], 'wp-login.php') !== false || strpos($_SERVER['REQUEST_URI'], 'wp-admin') !== false  || strpos($_SERVER['REQUEST_URI'], 'wp-login') !== false  ) {
        wp_redirect(home_url('/404-page'));
        exit;
    }
    return home_url('/wp-admin');
}
add_filter('login_redirect', 'custom_login_redirect', 10, 3);
// Redirect to a custom login page after logout
function custom_logout_redirect() {
    wp_redirect(home_url('/cgyx-elite-suite.php'));
    exit();
}
add_action('wp_logout', 'custom_logout_redirect');  
 
 


function cyberace_theme_setup() {
  register_nav_menus( array(
    'header' => 'Header menu',
    'footer' => 'Footer menu'
  ) );
}
add_action( 'after_setup_theme', 'cyberace_theme_setup' );
 



function custom_cyberace_types($mimes) {
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
}
add_filter('upload_mimes', 'custom_cyberace_types');



