-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·52 lines (36 loc) · 867 Bytes
/
index.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
<?php
/*
* Including wp-functions
*
*/
require_once(dirname(dirname(__FILE__)) . '../../../wp-blog-header.php');
define(WP_SVBTLE_EDITOR_DIR, WP_PLUGIN_DIR . "/wp-svbtle-editor");
/*
* Checking logued user
*
*/
if (!is_user_logged_in()) {
auth_redirect();
}
if(!current_user_can('publish_posts') or !current_user_can('edit_posts')){
die('You do not have sufficient permissions to access this page.');
}
/*
* Definition of WP-SVBTLE path
*
*/
if (! defined("ABSPATH")) {
define("ABSPATH", dirname(dirname(__FILE__)) . "/");
}
define("WPSVBTLE_PATH", ABSPATH . "wp-svbtle/");
/*
* Runing application
*
*/
require_once WP_PLUGIN_DIR . "/wp-svbtle-editor/includes/wps-functions.php";
$page = $_GET['page'] ? $_GET['page'] : '';
if($page === '') {
wp_redirect($current_page . 'index.php?page=dashboard');
}
wp_svbtle_render($page);
?>