| 1 |
<?php |
| 2 |
/** |
| 3 |
* @link www.faboba.com |
| 4 |
* @since 1.0 |
| 5 |
* @package Falang |
| 6 |
* |
| 7 |
* @wordpress-plugin |
| 8 |
* Plugin Name: Falang multilanguage for WordPress |
| 9 |
* Plugin URI: www.faboba.com/falangw/ |
| 10 |
* Description: Adds multilingual capability to WordPress (Lite version) |
| 11 |
* Version: 1.4.1 |
| 12 |
* Author: Faboba |
| 13 |
* Author URI: www.faboba.com |
| 14 |
* License: GPL-3.0+ |
| 15 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt |
| 16 |
* Text Domain: falang |
| 17 |
* Domain Path: /languages |
| 18 |
* |
| 19 |
* Copyright 2020-2025 Faboba |
| 20 |
* |
| 21 |
* This program is free software: you can redistribute it and/or modify |
| 22 |
* it under the terms of the GNU General Public License as published by |
| 23 |
* the Free Software Foundation, either version 2 of the License, or |
| 24 |
* (at your option) any later version. |
| 25 |
* |
| 26 |
* This program is distributed in the hope that it will be useful, |
| 27 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 28 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 29 |
* GNU General Public License for more details. |
| 30 |
* |
| 31 |
* You should have received a copy of the GNU General Public License |
| 32 |
* along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 33 |
* |
| 34 |
* This program incorporates work from the plugin Polylang |
| 35 |
* Copyright 2011-2019 Frédéric Demarle |
| 36 |
* Copyright 2021-2022 WP SYNTEX |
| 37 |
* |
| 38 |
* This program incorporates work from the plugin Sublanguage |
| 39 |
* Copyright 2015-2023 Maxime Schoeni |
| 40 |
*/ |
| 41 |
|
| 42 |
// If this file is called directly, abort. |
| 43 |
if ( ! defined( 'WPINC' ) ) { |
| 44 |
die; |
| 45 |
} |
| 46 |
|
| 47 |
require_once( dirname( __FILE__ ) . '/vendor/autoload.php' ); |
| 48 |
|
| 49 |
/** |
| 50 |
* Currently plugin version. |
| 51 |
*/ |
| 52 |
define( 'FALANG_VERSION', '1.4.1' ); |
| 53 |
define( 'FALANG_MIN_WP_VERSION', '4.7' ); |
| 54 |
define( 'FALANG_FILE', __FILE__ ); // this file |
| 55 |
define( 'FALANG_BASENAME', plugin_basename( FALANG_FILE ) ); // plugin name as known by WP |
| 56 |
define( 'FALANG_DIR', dirname( FALANG_FILE ) ); // our directory |
| 57 |
define( 'FALANG_ADMIN', FALANG_DIR . '/admin'); |
| 58 |
define( 'FALANG_INC', FALANG_DIR . '/includes'); |
| 59 |
define( 'FALANG_EXT', FALANG_DIR . '/ext'); |
| 60 |
define ('FALANG_ADMIN_URL', plugins_url('falang/admin')); |
| 61 |
|
| 62 |
|
| 63 |
/** |
| 64 |
* The code that runs during plugin activation. |
| 65 |
* This action is documented in includes/class-falang-activator.php |
| 66 |
*/ |
| 67 |
function activate_falang() { |
| 68 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-falang-activator.php'; |
| 69 |
Falang_Activator::activate(); |
| 70 |
} |
| 71 |
|
| 72 |
/** |
| 73 |
* The code that runs during plugin deactivation. |
| 74 |
* This action is documented in includes/class-falang-deactivator.php |
| 75 |
*/ |
| 76 |
function deactivate_falang() { |
| 77 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-falang-deactivator.php'; |
| 78 |
Falang_Deactivator::deactivate(); |
| 79 |
} |
| 80 |
|
| 81 |
register_activation_hook( __FILE__, 'activate_falang' ); |
| 82 |
register_deactivation_hook( __FILE__, 'deactivate_falang' ); |
| 83 |
|
| 84 |
|
| 85 |
require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 86 |
|
| 87 |
/** |
| 88 |
* The core plugin class that is used to define internationalization, |
| 89 |
* admin-specific hooks, and public-facing site hooks. |
| 90 |
*/ |
| 91 |
require plugin_dir_path( __FILE__ ) . 'includes/class-falang.php'; |
| 92 |
|
| 93 |
/** |
| 94 |
* The api class |
| 95 |
*/ |
| 96 |
require plugin_dir_path( __FILE__ ) . 'includes/api.php'; |
| 97 |
|
| 98 |
/** |
| 99 |
* Begins execution of the plugin. |
| 100 |
* |
| 101 |
* Since everything within the plugin is registered via hooks, |
| 102 |
* then kicking off the plugin from this point in the file does |
| 103 |
* not affect the page life cycle. |
| 104 |
* |
| 105 |
* @since 1.0 |
| 106 |
*/ |
| 107 |
|
| 108 |
function run_falang() { |
| 109 |
$plugin = new Falang(); |
| 110 |
$plugin->run(); |
| 111 |
} |
| 112 |
run_falang(); |
| 113 |
|
| 114 |
|