-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctions.php
32 lines (27 loc) · 886 Bytes
/
functions.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
<?php
/**
* Including libraries for this plugin
*/
defined( 'WPQT' ) OR wp_die();
$library_dir_name = 'lib';
$library_dir = plugin_dir_path(__FILE__) . $library_dir_name;
$lib_includes = array();
$files = array(
'core.php', // Wrapper class of Qiita API v2
'utils.php', // Class of common utilities
'shortcodes.php', // Class of each shortcodes definition
'main.php', // Final class as dispatcher
'init.php', // Instance factory & plugin activater
'widgets.php', // Class of each widgets definition
);
foreach ( $files as $file ) {
$lib_includes[] = $library_dir . '/' . $file;
}
unset( $library_dir_name, $library_dir, $files, $file );
foreach ( $lib_includes as $file ) {
if ( ! file_exists( $file ) ) {
trigger_error( sprintf( __('Error locating %s for inclusion', MPQT), $file ), E_USER_ERROR);
}
require_once $file;
}
unset( $file );