-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsql-to-cpt.php
More file actions
43 lines (37 loc) · 940 Bytes
/
sql-to-cpt.php
File metadata and controls
43 lines (37 loc) · 940 Bytes
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
<?php
/**
* Plugin Name: SQL to CPT
* Plugin URI: https://github.com/badasswp/sql-to-cpt
* Description: Import & Convert SQL files to Custom Post Types (CPT).
* Version: 1.3.4
* Author: badasswp
* Author URI: https://github.com/badasswp
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: sql-to-cpt
* Domain Path: /languages
*
* @package SqlToCpt
*/
namespace badasswp\SqlToCpt;
if ( ! defined( 'WPINC' ) ) {
exit;
}
define( 'SQLT_CPT_AUTOLOAD', __DIR__ . '/vendor/autoload.php' );
// Composer Check.
if ( ! file_exists( SQLT_CPT_AUTOLOAD ) ) {
add_action(
'admin_notices',
function () {
vprintf(
/* translators: Plugin directory path. */
esc_html__( 'Fatal Error: Composer not setup in %s', 'sql-to-cpt' ),
[ __DIR__ ]
);
}
);
return;
}
// Run Plugin.
require_once SQLT_CPT_AUTOLOAD;
( \SqlToCpt\Plugin::get_instance() )->run();