-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-menu.php
More file actions
executable file
·30 lines (27 loc) · 1.06 KB
/
Copy pathadmin-menu.php
File metadata and controls
executable file
·30 lines (27 loc) · 1.06 KB
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
<?php
require_once( plugin_dir_path( __FILE__ ) . 'post button.php' );
/*Create Databases*/
global $wpdb;
$results=$wpdb->get_results("CREATE TABLE WP_THREED(FILE_NAME VARCHAR(30) UNIQUE)");
$result=$wpdb->get_results("CREATE TABLE WP_BASE(BASE_URL VARCHAR(300) UNIQUE)");
/*Create admin menu and sub-menus*/
add_action('admin_menu', 'admin_menu');
function admin_menu()
{
add_menu_page( 'WordPress 3D','POINT105 AR','manage_options','three-d','library','dashicons-editor-contract',4 );
add_submenu_page('three-d','Settings','Base URL','manage_options','set','base_url');
add_submenu_page('three-d','Submenu2','Add New Model','manage_options','submen','add_new');
add_submenu_page('three-d','Submenu1','Library','manage_options','sub','library');
}
function add_new ()
{
require_once( plugin_dir_path( __FILE__ ) . 'add-new.php' );
}
function library()
{
require_once( plugin_dir_path( __FILE__ ) . 'library.php' );
}
function base_url()
{
require_once( plugin_dir_path( __FILE__ ) . 'base_url.php' );
}