-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·34 lines (23 loc) · 834 Bytes
/
functions.php
File metadata and controls
executable file
·34 lines (23 loc) · 834 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
<?php
/*
* Author: Boluge
* Custom functions, support, custom post types and more.
*/
/*------------------------------------*\
Optimisation function
\*------------------------------------*/
// http://www.screenfeed.fr/blog/accelerer-wordpress-en-divisant-le-fichier-functions-php-0548/
$divide = 'false';
$templatepath = get_template_directory();
$stylesheetpath = get_stylesheet_directory();
if( $divide == 'true' ){
if ( defined('DOING_AJAX') && DOING_AJAX && is_admin() ) {
include( $templatepath.'/assets/inc/ajax.php' );
} elseif ( is_admin() ) {
include( $templatepath.'/assets/inc/admin.php' );
} elseif ( !defined( 'XMLRPC_REQUEST' ) && !defined( 'DOING_CRON' ) ) {
include( $templatepath.'/assets/inc/frontend.php' );
}
} else {
include( $templatepath.'/assets/inc/functions.php' );
}