-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsv-it-plugin.php
More file actions
50 lines (38 loc) · 1.24 KB
/
csv-it-plugin.php
File metadata and controls
50 lines (38 loc) · 1.24 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/*
Plugin Name: CSV It Plugin
Plugin Uri: https://github.com/alnever/html-it-plugin
Description: The shortcode allows to download a table as a CSV-file
Version: 1.0
Author: Alex Neverov
Author URI: http://alneverov.ru
License: GPL2
Copyright 2018 Alex Neverov
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
namespace CsvItPlugin;
spl_autoload_register(
function ($class_name) {
if ( ! class_exists($class_name, FALSE) && strstr($class_name, __NAMESPACE__) !== FALSE )
{
$class_name = str_replace(__NAMESPACE__."\\","",$class_name);
$class_name = strtolower($class_name);
$class_name = str_replace("_","-",$class_name);
$class_name = str_replace("\\","/",$class_name);
include $class_name . ".php";
}
}
);
class Csv_It_Plugin {
public function __construct() {
new Csv_It();
}
}
new Csv_It_Plugin();
?>