-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
97 lines (78 loc) · 2.19 KB
/
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
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
/**
* Base page template
*
* @package Configure 8 Admin
* @subpackage Templates
* @since 1.0.0
*/
// Access namespaced functions.
use function CFE_Admin_Theme\{
plugin,
is_rtl,
body_classes
};
// Site direction.
$dir = 'ltr';
if ( is_rtl() ) {
$dir = 'rtl';
}
// HTML element class.
$html_class = 'no-js';
// Language direction class.
if ( is_rtl() ) {
$html_class .= ' rtl';
} else {
$html_class .= ' ltr';
}
// Class removed on click by script in the theme plugin.
if ( plugin() && 'theme' == plugin()->admin_theme() && 'themes' == $url->slug() ) {
$html_class .= ' no-scroll';
}
// Show admin menu.
$menu_style = '';
if ( plugin() && 'configureight' == plugin()->className() ) {
$menu_style = sprintf(
'style="display:%s;"',
plugin()->admin_menu() ? 'block' : 'none'
);
}
?>
<!DOCTYPE html>
<html dir="<?php echo $dir; ?>" class="<?php echo $html_class; ?>" lang="<?php echo $L->currentLanguageShortVersion(); ?>" xmlns:og="http://opengraphprotocol.org/schema/" data-admin-page>
<?php include( 'views/head.php' ); ?>
<body class="<?php body_classes(); ?>">
<?php Theme :: plugins( 'adminBodyBegin' ); ?>
<?php
// JavaScript generated by PHP.
echo '<script charset="utf-8">' . PHP_EOL;
include( PATH_CORE_JS . 'variables.php' );
echo '</script>' . PHP_EOL;
echo '<script charset="utf-8">' . PHP_EOL;
include( PATH_CORE_JS . 'bludit-ajax.php' );
echo '</script>' . PHP_EOL;
?>
<?php
// JavaScript alerts.
echo '<div id="jsshadow"></div>';
include( 'views/alert.php' ); ?>
<div class="admin-wrapper">
<div id="admin-menu" class="admin-menu" <?php echo $menu_style; ?>>
<?php include( 'views/menu.php' ); ?>
</div>
<div id="admin-content" class="admin-content">
<?php
if ( Sanitize :: pathFile( PATH_ADMIN_VIEWS, $layout['view'] . '.php' ) ) {
include( PATH_ADMIN_VIEWS . $layout['view'] . '.php' );
} elseif ( $layout['plugin'] && method_exists( $layout['plugin'], 'adminView' ) ) {
echo $layout['plugin']->adminView();
} else {
echo '<h1 class="text-center">' . $L->g( 'Page not found' ) . '</h1>';
echo '<h2 class="text-center">' . $L->g( 'Choose a page from the menu.' ) . '</h2>';
}
?>
</div>
</div>
<?php Theme :: plugins( 'adminBodyEnd' ); ?>
</body>
</html>