<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

require_once SWAP_TO_DIR . '/post_type/metaboxes/metabox.php';
require_once SWAP_TO_DIR . '/post_type/taxonomy_meta/metaboxes.php';
require_once SWAP_TO_DIR . '/settings/google-fonts.php';
require_once SWAP_TO_DIR . '/settings/settings.php';

function swap_to_wp_head()
{
    ?>
    <script type="text/javascript">
        var swap_to_ajaxurl = '<?php echo esc_url(admin_url('admin-ajax.php')); ?>';
    </script>
    <?php
}

add_action('wp_head', 'swap_to_wp_head');
add_action('admin_head', 'swap_to_wp_head');