<?php
/*
Plugin Name: Zoddak New Developments Connector v2
 * Plugin URI: https://www.zoddak.com/
 * Description: 2º version for Zoddak's new developments, displays them professionally and responsively on your website.
 * Version: 2.1.12
 * Author: Zoddak
 * Author URI: https://www.zoddak.com/
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: new-devs.v2
 * Domain Path: /languages
*/

if (!defined('ABSPATH')) {
    exit;
}
define('WP_ENVIRONMENT_TYPE', 'production');
define('ZODDAK_PLUGIN_URL', plugin_dir_url(__FILE__));
define('ZODDAK_PLUGIN_SLUG', 'zoddak-new-developments');
define('ZODDAK_PLUGIN_PATH', plugin_dir_path(__FILE__));
define('ZODDAK_PLUGIN_BASENAME', plugin_basename(__FILE__));
define('ZODDAK_UPDATES_URL_DEV_ENV', 'http://zoddak-beta.test/api/plugin_updates/get_last_update');
define('ZODDAK_UPDATES_URL_PROD_ENV', 'https://app.zoddak.com/api/plugin_updates/get_last_update');
define('ZODDAK_STATS_TOKEN', '3d117de6-d05d-11f0-88ea-5bb9bcf530a1');

require_once plugin_dir_path(__FILE__) . 'helpers/functions-helper.php';
require_once plugin_dir_path(__FILE__) . 'includes/admin-menu.php';
require_once plugin_dir_path(__FILE__) . 'controllers/AdminController.php';
require_once plugin_dir_path(__FILE__) . 'controllers/ApiController.php';
require_once plugin_dir_path(__FILE__) . 'controllers/PropertiesController.php';
require_once plugin_dir_path(__FILE__) . 'controllers/RoutesController.php';
require_once plugin_dir_path(__FILE__) . 'src/Routing/Routes.php';
require_once plugin_dir_path(__FILE__) . 'src/Admin/Assets.php';
require_once plugin_dir_path(__FILE__) . 'src/Admin/Admin.php';
require_once plugin_dir_path(__FILE__) . 'src/Front/Assets.php';
require_once plugin_dir_path(__FILE__) . 'src/Front/StatsAjax.php';
require_once plugin_dir_path(__FILE__) . 'src/I18n/I18n.php';
require_once plugin_dir_path(__FILE__) . 'src/Integrations/ContactForm7.php';
require_once plugin_dir_path(__FILE__) . 'src/Debug/Debug.php';
require_once plugin_dir_path(__FILE__) . 'src/Updates/Updater.php';

Updater::init();
I18n::init();
FrontAssets::init();
StatsAjax::init();
AdminAssets::init();
Admin::init();
Routes::init();
ContactForm7::register();

register_activation_hook(__FILE__, function() {
    add_option('zoddak_card_size', 'medium');
    add_option('zoddak_page_width', '960px');
    add_option('zoddak_property_layout', 'horizontal');
    add_option('zoddak_card_bg_color', '#ffffff');
    add_option('zoddak_border_rounded', '7px');
    add_option('zoddak_type_property_btn_color', '#dddd0f');
    add_option('zoddak_type_property_txt_color', '#ffffff');
    add_option('zoddak_color_horizontal_line', '#c61c1c');
    add_option('zoddak_current_page_color', '#110400');
});
function mpp_mensaje_bienvenida() {
    echo "
        <div class='notice notice-success is-dismissible'>
            <p>¡New Developments está activo y funcionando!</p>
        </div>";
}
add_action('wp_head', function() {
    echo '<meta name="viewport" content="width=device-width, initial-scale=1">';
}, 1);
