-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
75 lines (64 loc) · 2.58 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
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
71
72
73
74
75
<?php
/**
* UnderStrap functions and definitions
*
* @package UnderStrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$understrap_includes = array(
'/theme-settings.php', // Initialize theme default settings.
'/setup.php', // Theme setup and custom theme supports.
'/widgets.php', // Register widget area.
'/enqueue.php', // Enqueue scripts and styles.
'/template-tags.php', // Custom template tags for this theme.
'/pagination.php', // Custom pagination for this theme.
'/hooks.php', // Custom hooks.
'/extras.php', // Custom functions that act independently of the theme templates.
'/customizer.php', // Customizer additions.
'/custom-comments.php', // Custom Comments file.
'/jetpack.php', // Load Jetpack compatibility file.
'/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker. Trying to get deeper navigation? Check out: https://github.com/understrap/understrap/issues/567.
'/woocommerce.php', // Load WooCommerce functions.
'/editor.php', // Load Editor functions.
'/deprecated.php', // Load deprecated functions.
'/acf.php', // Load ACF functions.
'/ee_taxonomies.php', //custom taxonomies
);
foreach ( $understrap_includes as $file ) {
require_once get_template_directory() . '/inc' . $file;
}
//new img thumbnail size
add_image_size( 'eng-size', 500, 500, array( 'center', 'center' ) );
/** add additional classes / id to the facetwp-template div generated by a facetwp
** layout template
**/
add_filter( 'facetwp_shortcode_html', function( $output, $atts) {
if ( $atts['template'] = 'lesson_display' ) { // replace 'example' with name of your template
/** modify replacement as needed, make sure you keep the facetwp-template class **/
$output = str_replace( 'class="facetwp-template"', 'class="row facetwp-template"', $output );
}
return $output;
}, 10, 2 );
function ee_image_div($count){
if ($count === 1){
return 'col-md-12';
}if ($count === 2){
return 'col-md-6';
}if ($count === 3){
return 'col-md-4';
}if ($count === 4){
return 'col-md-3';
} if ($count >4){
return 'col-md-3';
}
}
function ee_time_list($name, $time){
$html = '<li>';
if($name){
$html .= $name . ' - ';
}
$html .= $time . ' minutes</li>';
return $html;
}
//print("<pre>".print_r($a,true)."</pre>");