<?php

$currentDir = dirname(__FILE__);

define('_CTLPPU_NAMESPACE_', 'CTLPPU');
define('_CTLPPU_PLUGIN_NAME_', 'website-analysis'); // same with wordpress url
define('_CTLPPU_PLUGIN_NAME_PATH_', 'website-analysis-ultimate');
define('_CTLPPU_NAME_', 'Website Analysis Plugin for Facebook, Twitter and Google Plus');
define('_CTLPPU_THEME_NAME_', 'default');
define('_CTLPPU_SUPPORT_EMAIL_', 'support@squirrly.co');
define('_CTLPPU_OPTION_', '_ctlppu_options');
define('_CTLPPU_ITMS_', '60');

/* Track */
define('_CTLPPU_SIGNUPLINK_', "http://app.contentlook.co/signup" );
define('_CTLPPU_TRACK_', '#ref=' . _CTLPPU_PLUGIN_NAME_PATH_ . '-' . CTLPPU_VERSION . '&v=' . CTLPPU_VERSION . '&site=' . $_SERVER['SERVER_NAME']);

/* Directories */
define('_CTLPPU_ROOT_DIR_', realpath(dirname($currentDir)) . '/');
define('_CTLPPU_CLASSES_DIR_', _CTLPPU_ROOT_DIR_ . 'classes/');
define('_CTLPPU_CONTROLLER_DIR_', _CTLPPU_ROOT_DIR_ . 'controllers/');
define('_CTLPPU_MODEL_DIR_', _CTLPPU_ROOT_DIR_ . 'models/');
define('_CTLPPU_TRANSLATIONS_DIR_', _CTLPPU_ROOT_DIR_ . 'languages/');
define('_CTLPPU_THEME_DIR_', _CTLPPU_ROOT_DIR_ . 'view/');

/* URLS */
define('_CTLPPU_URL_', rtrim(plugins_url('', $currentDir), '/') . '/');
define('_CTLPPU_THEME_URL_', _CTLPPU_URL_ . 'view/');

/* API */
defined('_CTLPPU_SSL') || define('_CTLPPU_SSL', (((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") || (defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN) || (function_exists('is_ssl') && is_ssl())) ? 'https:' : 'http:')); //CHECK SSL
define('_CTLPPU_API_PATH_', _CTLPPU_SSL. '//api.contentlook.co/ctl/wp/');

/*
 * Other URLs
 */

define('_PLUGIN_REVIEW_URL_','https://wordpress.org/support/plugin/posts-analysis/reviews/?filter=5');

$upload_dir['baseurl'] = network_site_url('/wp-content/uploads');
$upload_dir['basedir'] = ABSPATH . 'wp-content/uploads';
