<?php
// Add a menu item for the settings page.
add_action('admin_menu', 'custom_plugin_add_settings_page');
function custom_plugin_add_settings_page()
{
    add_submenu_page(
        'tools.php',              // Parent slug
        esc_html__('Plugin Sports Settings','sport'), // Page title
        esc_html__('Plugin Sports Settings','sport'),        // Menu title
        'manage_options',         // Capability
        'bongdako-iframe-settings', // Menu slug
        'bongdako_iframe_plugin_settings_page' // Callback function
    );
}

// Add a settings link on the plugins page.
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'bongdako_iframe_plugin_settings_link');
function bongdako_iframe_plugin_settings_link($links)
{
    $settings_link = '<a href="' . admin_url('tools.php?page=bongdako-iframe-settings') . '">'.__('Cài đặt','sport').'</a>';
    array_unshift($links, $settings_link);
    return $links;
}

function bongdako_enqueue_google_fonts()
{
    wp_enqueue_style('bongdako-google-fonts', 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap', false);
}
add_action('admin_enqueue_scripts', 'bongdako_enqueue_google_fonts');
