-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcsv_import.php
66 lines (35 loc) · 1.05 KB
/
csv_import.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
<?php
/*
Plugin Name: CSV Importer
Plugin URI: https://github.com/sabbirshawon/csv_import_wp_plugin/
Description: This is a wordpress plugin for csv file import to mysql database
Version: 1.0
Author: Sabbir
Author URI: https://sabbirshawon.github.com/
License: GPLv2 or later
Text Domain: csv-import
Domain Path: /languages/
*/
if(!defined("ABSPATH"))
exit;
if(!defined("CSV_IMPORT_DIR_PATH"))
define("CSV_IMPORT_DIR_PATH",plugin_dir_path(__FILE__));
if(!defined("CSV_IMPORT_URL"))
define("CSV_IMPORT_URL", plugins_url());
define("PLUGIN_VERSION", "1.0");
function csv_menus(){
add_menu_page(
"CSV Import", //page title
"CSV Import", //menu title
"manage_options", //admin level
"csv-import", // page slug - parent slug
"csv_import", // callback function
"dashicons-image-filter", // icon url
6 // positions
);
}
add_action("admin_menu","csv_menus");
function csv_file(){
// add new function
include_once CSV_IMPORT_DIR_PATH."/views/csv-import.php";
}