-
Notifications
You must be signed in to change notification settings - Fork 2
/
options.php
executable file
·48 lines (40 loc) · 907 Bytes
/
options.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
<?php
if(isset($_POST['themeUrl']))
{
update_option('themeUrl',$_POST['themeUrl']);
}
if(isset($_POST['loadPlugins']))
{
update_option('loadPlugins',$_POST['loadPlugins']);
}
function OptionsFunc(){
?>
<h2>
LuGe Options
</h2>
<h3>
CDN
</h3>
<p>
Input the theme url:
</p>
<form method="post">
<input name="themeUrl" size="40" value="<?php echo get_option('themeUrl'); ?>" placeholder="http://www.example.com/LuGeTheme/" />
<input type="submit" value="SAVE" />
</form>
<h3>
Support Front plugins
</h3>
<p>
Do you want to load plugins' js/css file:
</p>
<form method="post">
<input type="submit" name="loadPlugins" value="<?php echo get_option('loadPlugins')=='YES'?'NO':'YES'; ?>" />
</form>
<?php
}
function addOptionsPage(){
add_theme_page( 'LuGe Options', 'LuGe Options', 'administrator', 'LuGeThemeOptions','OptionsFunc');
}
add_action('admin_menu', 'addOptionsPage');
?>