Example #1
0
function yith_ywar_init()
{
    /**
     * Load text domain and start plugin
     */
    load_plugin_textdomain('yith-woocommerce-advanced-reviews', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    require_once YITH_YWAR_DIR . 'class.yith-woocommerce-advanced-reviews.php';
    global $YWAR_AdvancedReview;
    $YWAR_AdvancedReview = YITH_WooCommerce_Advanced_Reviews::get_instance();
}
 /**
  * Returns single instance of the class
  *
  * @since 1.0.0
  */
 public static function get_instance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Example #3
0
if (!defined('YITH_YWAR_URL')) {
    define('YITH_YWAR_URL', plugins_url('/', __FILE__));
}
if (!defined('YITH_YWAR_ASSETS_URL')) {
    define('YITH_YWAR_ASSETS_URL', YITH_YWAR_URL . 'assets');
}
if (!defined('YITH_YWAR_TEMPLATE_PATH')) {
    define('YITH_YWAR_TEMPLATE_PATH', YITH_YWAR_DIR . 'templates');
}
if (!defined('YITH_YWAR_TEMPLATES_DIR')) {
    define('YITH_YWAR_TEMPLATES_DIR', YITH_YWAR_DIR . '/templates/');
}
if (!defined('YITH_YWAR_ASSETS_IMAGES_URL')) {
    define('YITH_YWAR_ASSETS_IMAGES_URL', YITH_YWAR_ASSETS_URL . '/images/');
}
//endregion
/**
 * Load text domain and start plugin
 */
load_plugin_textdomain('ywar', false, dirname(plugin_basename(__FILE__)) . '/languages/');
/**
 * Init default plugin settings
 */
if (!function_exists('yith_plugin_registration_hook')) {
    require_once 'plugin-fw/yit-plugin-registration-hook.php';
}
register_activation_hook(__FILE__, 'yith_plugin_registration_hook');
require_once YITH_YWAR_DIR . 'class.yith-woocommerce-advanced-reviews.php';
global $YWAR_AdvancedReview;
$YWAR_AdvancedReview = YITH_WooCommerce_Advanced_Reviews::get_instance();