-
Notifications
You must be signed in to change notification settings - Fork 108
/
qtranslate.php
71 lines (64 loc) · 2.91 KB
/
qtranslate.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Plugin Name: qTranslate-XT
* Plugin URI: https://github.com/qtranslate/qtranslate-xt/
* Description: Adds user-friendly multilingual content support, stored in single post.
* Version: 3.15.2
* Requires at least: 5.0
* Requires PHP: 7.1
* Author: qTranslate Community
* Author URI: https://github.com/qtranslate/
* Tags: multilingual, multi, language, admin, tinymce, Polyglot, bilingual, widget, switcher, professional, human, translation, service, qTranslate, zTranslate, mqTranslate, qTranslate Plus, WPML
* Text Domain: qtranslate
* Domain Path: /lang/
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
* Author e-mail: herrvigg@gmail.com
* Original Author: John Clause and Qian Qin (https://www.qianqin.de mail@qianqin.de)
* GitHub Plugin URI: https://github.com/qtranslate/qtranslate-xt/
*/
/* Unused keywords (as described in https://codex.wordpress.org/Writing_a_Plugin):
* Network: Optional. Whether the plugin can only be activated network wide. Example: true
*/
/*
Copyright 2019-2023 qTranslate Community
The statement below within this comment block is relevant to
this file as well as to all files in this folder and to all files
in all sub-folders of this folder recursively.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Search for 'Designed as interface for other plugin integration' in comments to functions
* to find out which functions are safe to use in the 3rd-party integration.
* Avoid accessing internal variables directly, as they are subject to be re-designed at any time.
*/
if ( ! function_exists( 'add_filter' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
/**
* The constants defined below are designed as interface for other plugin integration.
* @see https://github.com/qtranslate/qtranslate-xt/wiki/Integration-Guide/
*/
const QTX_VERSION = '3.15.2';
if ( ! defined( 'QTRANSLATE_FILE' ) ) {
define( 'QTRANSLATE_FILE', __FILE__ );
define( 'QTRANSLATE_DIR', __DIR__ );
}
require_once QTRANSLATE_DIR . '/src/init.php';
add_action( 'plugins_loaded', 'qtranxf_init_language', 2 ); // User is not authenticated yet, high priority needed.
if ( is_admin() ) {
require_once QTRANSLATE_DIR . '/src/admin/activation_hook.php';
qtranxf_register_activation_hooks();
}