
/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/

/*----------------------------------------------------
CHECK DEPEDABLE PLUGIN
-----------------------------------------------------*/
add_action('switch_theme', function () {
    $allowed_themes = ['bizlist-pro', 'bizlist-pro-child']; // Define allowed themes
    $current_theme = get_option('stylesheet'); // Get the active theme's stylesheet slug
    $plugins_to_deactivate = ['bizlist-core/index.php', 'bizlist-essential/bizlist-essential.php']; // List of plugins to deactivate

    if (!in_array($current_theme, $allowed_themes, true)) {
        foreach ($plugins_to_deactivate as $plugin) {
            if (is_plugin_active($plugin)) {
                deactivate_plugins($plugin);
            }
        }
    }
});
/*----------------------------------------------------
LOAD COMPOSER PSR - 4
-----------------------------------------------------*/
if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) :
    require_once dirname(__FILE__) . '/vendor/autoload.php';
endif;

/*----------------------------------------------------
SHORTHAND CONTANTS FOR THEME VERSION
-----------------------------------------------------*/
define('BIZLIST_DEV_MODE', false);
if (BIZLIST_DEV_MODE) {
    define('BIZLIST_VERSION', time());
    define('BIZLIST_SCRIPT_VAR', '.');
} else {
    define('BIZLIST_VERSION', '1.0');
    define('BIZLIST_SCRIPT_VAR', '.min.');
}


/*----------------------------------------------------
SHORTHAND CONTANTS FOR THEME ASSETS URL
-----------------------------------------------------*/
define('BIZLIST_THEME_URI', get_template_directory_uri());
define('BIZLIST_IMG', BIZLIST_THEME_URI . '/assets/images');
define('BIZLIST_CSS', BIZLIST_THEME_URI . '/assets/css');
define('BIZLIST_JS', BIZLIST_THEME_URI . '/assets/js');

/*----------------------------------------------------
SHORTHAND CONTANTS FOR THEME ASSETS DIRECTORY PATH
-----------------------------------------------------*/
define('BIZLIST_THEME_DIR', get_template_directory());
define('BIZLIST_IMG_DIR', BIZLIST_THEME_DIR . '/assets/images');
define('BIZLIST_CSS_DIR', BIZLIST_THEME_DIR . '/assets/css');
define('BIZLIST_JS_DIR', BIZLIST_THEME_DIR . '/assets/js');

// option prefix
define('BIZLIST_OPTION_KEY', 'bizlist_settings');
/*----------------------------------------------------
SET UP THE CONTENT WIDTH VALUE BASED ON THE THEME'S DESIGN
-----------------------------------------------------*/

// hooks for unyson framework
// ----------------------------------------------------------------------------------------
function bizlist_framework_customizations_dir_rel_path($rel_path)
{

    return '/app/Core/Hook';
}
add_filter('fw_framework_customizations_dir_rel_path', 'bizlist_framework_customizations_dir_rel_path');

if (!isset($content_width)) {
    $content_width = 800;
}
if (class_exists('Bizlist\\Init')) :
    Bizlist\Init::register_services();
endif;

/*----------------------------------------------------
Remove core plugin after theme deactivated
-----------------------------------------------------*/

add_action('switch_theme', 'remove_plugin');

function remove_plugin()
{
    $essential_plugin = 'bizlist-essential/bizlist-essential.php';
    $core_plugin = 'bizlist-core/index.php';

    if (in_array($essential_plugin, apply_filters('active_plugins', get_option('active_plugins'))) && in_array($core_plugin, apply_filters('active_plugins', get_option('active_plugins')))) {
        deactivate_plugins([$essential_plugin, $core_plugin]);
    }
}

/*----------------------------------------------------
Set permalink to post after theme activated
-----------------------------------------------------*/

add_action('after_setup_theme', 'reset_permalinks');
function reset_permalinks()
{
    global $wp_rewrite;
    $wp_rewrite->set_permalink_structure('/%postname%/');
    $wp_rewrite->flush_rules();
}


/*----------------------------------------------------
UTILITY
-----------------------------------------------------*/
require_once BIZLIST_THEME_DIR . '/app/Utility/global.php';
require_once BIZLIST_THEME_DIR . '/app/Utility/Helpers.php';
require_once BIZLIST_THEME_DIR . '/app/Utility/template-tags.php';

/*----------------------------------------------------
option init
-----------------------------------------------------*/
require_once BIZLIST_THEME_DIR . '/app/Option/Init.php';
require_once BIZLIST_THEME_DIR . '/woocommerce/woo-setup.php';
require_once BIZLIST_THEME_DIR . '/adirectory/adlisting-hooks.php';
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.abafie.net/wp-content/plugins/slim-seo/src/Sitemaps/style.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
	<url>
		<loc>https://www.abafie.net/store/</loc>
	</url>
	<url>
		<loc>https://www.abafie.net/store/compughana-ltd/</loc>
		<lastmod>2025-11-23T04:57:09+00:00</lastmod>
	</url>
	<url>
		<loc>https://www.abafie.net/store/melcom/</loc>
		<lastmod>2025-11-15T05:37:29+00:00</lastmod>
	</url>
</urlset>