-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish-kintone-data.php
70 lines (61 loc) · 1.89 KB
/
publish-kintone-data.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
<?php
/**
* Plugin Name: Publish kintone data
* Plugin URI:
* Description: The data of kintone can be reflected on WordPress.
* Version: 1.14.1
* Author: Takashi Hosoya
* Author URI: http://ht79.info/
* License: GPLv2
* Text Domain: kintone-to-wp
* Domain Path: /languages
*
* @package import-kintone
*/
/**
* Copyright (c) 2017 Takashi Hosoya ( http://ht79.info/ )
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 or, at
* your discretion, any later version, 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
namespace publish_kintone_data;
define( 'KINTONE_TO_WP_URL', plugins_url( '', __FILE__ ) );
define( 'KINTONE_TO_WP_PATH', __DIR__ );
$data = get_file_data(
__FILE__,
array(
'ver' => 'Version',
'langs' => 'Domain Path',
)
);
define( 'KINTONE_TO_WP_VERSION', $data['ver'] );
define( 'KINTONE_TO_WP_LANGS', $data['langs'] );
load_plugin_textdomain(
'kintone-to-wp',
false,
dirname( plugin_basename( __FILE__ ) ) . KINTONE_TO_WP_LANGS
);
/**
* Initialize the plugin.
*
* @return void
*/
function init() {
require_once KINTONE_TO_WP_PATH . '/inc/class-kintone-utility.php';
require_once KINTONE_TO_WP_PATH . '/admin/class-admin.php';
new Admin();
require_once KINTONE_TO_WP_PATH . '/class-publish-kintone-data.php';
new Publish_Kintone_Data();
}
add_action( 'plugins_loaded', 'publish_kintone_data\init', 10 );