-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
42 lines (36 loc) · 1.41 KB
/
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
33
34
35
36
37
38
39
40
41
42
<?php
// * Setup variables
// */
define( 'THEME_VERSION', '2.6.13' );
/**
* Includes
*/
$theme_includes = array(
'lib/functions.php', // Various helping functions
'lib/helpers.php', // Helper classes
'lib/assets.php', // Scripts and stylesheets
'lib/extras.php', // Custom functions
'lib/setup.php', // Theme setup
'lib/wrapper.php', // Theme wrapper class
'lib/wrapper.php', // Theme wrapper class
'lib/cleaner/assets.php', // Clean assets
'lib/cleaner/comments.php', // Disable comments
'lib/cleaner/emojis.php', // Disable emojis
'lib/cleaner/oembed.php', // Disable oembed
'lib/cleaner/rest-api.php', // Disable REST API for visitors
'lib/cleaner/wordpress.php', // Clean WordPress things
'lib/cleaner/yoast.php', // Clean Yoast things
'lib/post-types.php', // Theme Post Types
'lib/taxonomies.php', // Theme Taxonomies
'lib/metaboxes.php', // Theme Metaboxes
'lib/shortcodes.php', // Theme Shortcodes
'lib/rest-api-endpoints.php', // Rest API custom endpoints
);
foreach ( $theme_includes as $file ) {
$filepath = locate_template( $file );
if ( ! $filepath ) {
trigger_error( sprintf( esc_html( __( 'Error locating %s for inclusion', 'urlslab' ) ), esc_url( $file ) ), E_USER_ERROR );
}
require_once $filepath;
}
unset( $file, $filepath );