<?php
/*
 * Plugin Name: اتصال وردپرس و WHMCS فارسی
 *  * Plugin URI: http://www.persianscript.ir
 * Description: اتصال WHMCS به وردپرس . دانلود رایگان از پرشین اسکریپت
 * Version: 2.6.0-revision.0
 * Text domain: whcom
 * Domain Path: /common/languages
 * Author: پرشین اسکریپت
 * Author URI: http://www.persianscript.ir
*/

if ( ! defined( 'WCAP_PATH' ) ) {
	define( 'WCAP_PATH', dirname( __FILE__ ) );
}
if ( ! defined( 'WCAP_URL' ) ) {
	define( 'WCAP_URL', untrailingslashit( plugins_url( basename( dirname( __FILE__ ) ) ) ) );
}
if ( ! defined( 'WCAP_FILE' ) ) {
	define( 'WCAP_FILE', __FILE__ );
}
if ( ! defined( 'WCAP_VERSION' ) ) {
	define( 'WCAP_VERSION', '2.6.0' );
}


## Adding Common functions
if ( ! defined( 'WHCOM_VERSION' ) ) {
	if ( ! defined( 'WHCOM_URL' ) ) {
		define( 'WHCOM_URL', plugin_dir_url( __FILE__ ) . "common");
	}
	require_once (WCAP_PATH . '/common/whcom.php');
}

require_once( ABSPATH . WPINC . '/class-phpass.php' );
$wp_hasher = new PasswordHash( 10, false );

include_once WCAP_PATH . "/library/WCAP.php";

$W=new WCAP();

include_once WCAP_PATH . '/library/functions.php';
include_once WCAP_PATH . '/library/functions_i.php';


function wcap_load_textdomain() {

    load_plugin_textdomain( 'whcom', FALSE, basename( dirname( __FILE__ ) ) . '/common/languages/' );


}
add_action( 'plugins_loaded', 'wcap_load_textdomain' );

if ( ! defined( 'CC_SAVEABLE' ) ) {
    define( 'CC_SAVEABLE', wcap_cc_saveable() );
}

