<?php
/**
 * Plugin Name: Ziber API
 * Plugin URI: https://ziber.eu
 * Description:
 * Requires at least: 5.6
 * Requires PHP: 5.6
 * Version: 0.7.2
 * Author: Ziber Team
 * Author URI: https://ziber.eu
 * Text Domain: zbr
 * Domain Path: /languages
 *
 * @package Zbr
 */
const ZBR_VERSION = '0.7.3';
const ZBR_PLUGIN = __FILE__;
define( 'ZBR_DIR', dirname( ZBR_PLUGIN ) );

require_once ZBR_DIR . '/vendor/autoload.php';

function write_log($log) {
    error_log($log);
    if (true === WP_DEBUG) {
        if (is_array($log) || is_object($log)) {
            error_log(print_r($log, true));
        } else {
            error_log($log);
        }
    }
}

if(!class_exists('Zbr_Plugin', false)){
    include_once ZBR_DIR.'/includes/class-plugin.php';
}

//Don't do anything if this file was called directly
if (defined('ABSPATH') && defined('WPINC')) {
    $plugin = Zbr_Plugin_Core::instance();

    register_activation_hook(__FILE__, [$plugin, 'on_activation']);
    register_deactivation_hook(__FILE__, [$plugin, 'on_deactivation']);
}
