public static function api_client_id() { return get_option(UBConfig::UB_API_CLIENT_ID_KEY, UBConfig::default_api_client_id()); }
require_once dirname(__FILE__) . '/UBDiagnostics.php'; require_once dirname(__FILE__) . '/UBUtil.php'; require_once dirname(__FILE__) . '/UBConfig.php'; require_once dirname(__FILE__) . '/UBLogger.php'; require_once dirname(__FILE__) . '/UBHTTP.php'; require_once dirname(__FILE__) . '/UBIcon.php'; require_once dirname(__FILE__) . '/UBPageTable.php'; require_once dirname(__FILE__) . '/UBEvents.php'; require_once dirname(__FILE__) . '/UBTemplate.php'; register_activation_hook(__FILE__, function () { add_option(UBConfig::UB_ROUTES_CACHE_KEY, array()); add_option(UBConfig::UB_REMOTE_DEBUG_KEY, 0); add_option(UBConfig::UB_PAGE_SERVER_DOMAIN_KEY, UBConfig::default_page_server_domain()); add_option(UBConfig::UB_REMOTE_LOG_URL_KEY, UBConfig::default_remote_log_url()); add_option(UBConfig::UB_API_URL_KEY, UBConfig::default_api_url()); add_option(UBConfig::UB_API_CLIENT_ID_KEY, UBConfig::default_api_client_id()); add_option(UBConfig::UB_AUTHORIZED_DOMAINS_KEY, UBConfig::default_authorized_domains()); add_option(UBConfig::UB_HAS_AUTHORIZED_KEY); add_option(UBConfig::UB_REMOTE_EVENTS_URL_KEY, UBConfig::default_remote_events_url()); add_option(UBConfig::UB_USER_ID_KEY); add_option(UBConfig::UB_DOMAIN_ID_KEY); add_option(UBConfig::UB_CLIENT_ID_KEY); add_option(UBConfig::UB_PROXY_ERROR_MESSAGE_KEY); }); register_deactivation_hook(__FILE__, function () { foreach (UBConfig::ub_option_keys() as $key) { delete_option($key); } }); add_action('init', function () { UBLogger::setup_logger();