-
Notifications
You must be signed in to change notification settings - Fork 0
/
cocart-language.php
41 lines (36 loc) · 1.08 KB
/
cocart-language.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/*
* Plugin Name: CoCart Language
* Plugin URI: https://cocart.xyz
* Description: Experimental plugin to add language support for CoCart.
* Author: Sébastien Dumont
* Author URI: https://sebastiendumont.com
* Version: 1.0.0
* Text Domain: cocart-lang
* Domain Path: /languages/
* Requires at least: 5.6
* Requires PHP: 7.4
* WC requires at least: 5.4
* WC tested up to: 6.7
*
* @package CoCart Language
*/
defined( 'ABSPATH' ) || exit;
if ( ! defined( 'COCART_LANGUAGE_FILE' ) ) {
define( 'COCART_LANGUAGE_FILE', __FILE__ );
}
// Include the main CoCart Language Package class.
if ( ! class_exists( 'CoCart\Language\Package', false ) ) {
include_once untrailingslashit( plugin_dir_path( COCART_LANGUAGE_FILE ) ) . '/includes/class-cocart-language.php';
}
/**
* Returns the main instance of cocart_language and only runs if it does not already exists.
*
* @return cocart_language
*/
if ( ! function_exists( 'cocart_language' ) ) {
function cocart_language() {
return CoCart\Language\Package::init();
}
add_action( 'plugins_loaded', 'cocart_language', 0 );
}