-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathonlyoffice-docspace-wordpress.php
97 lines (86 loc) · 2.88 KB
/
onlyoffice-docspace-wordpress.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
/**
* The plugin bootstrap file.
*
* @package Onlyoffice_Docspace_Plugin
*
* Plugin Name: ONLYOFFICE DocSpace
* Plugin URI: https://github.com/ONLYOFFICE/onlyoffice-docspace-wordpress
* Description: Add ONLYOFFICE DocSpace on page
* Version: 2.1.2
* Requires at least: 5.7
* Requires PHP: 7.4
* Author: Ascensio System SIA
* Author URI: https://www.onlyoffice.com
* License: GNU General Public License v2.0
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* Text Domain: onlyoffce-docspace-plugin
* Domain Path: /languages
*/
/**
*
* (c) Copyright Ascensio System SIA 2024
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Currently plugin version.
*/
define( 'OODSP_PLUGIN_NAME', 'onlyoffice-docspace-wordpress' );
define( 'OODSP_VERSION', '2.1.2' );
define( 'OODSP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'OODSP_PLUGIN_FILE', __FILE__ );
/**
* The code that runs during plugin activation.
*/
function oodsp_activate_plugin() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-oodsp-activator.php';
OODSP_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
*/
function oodsp_deactivate_plugin() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-oodsp-deactivator.php';
OODSP_Deactivator::deactivate();
}
/**
* The code that runs during plugin unistall.
*/
function oodsp_unistall_plugin() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-oodsp-deactivator.php';
OODSP_Deactivator::uninstall();
}
register_activation_hook( __FILE__, 'oodsp_activate_plugin' );
register_deactivation_hook( __FILE__, 'oodsp_deactivate_plugin' );
register_uninstall_hook( __FILE__, 'oodsp_unistall_plugin' );
require plugin_dir_path( __FILE__ ) . 'includes/class-oodsp-plugin.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
*/
function oodsp_run_plugin() {
$plugin = new OODSP_Plugin();
$plugin->run();
}
oodsp_run_plugin();