-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
executable file
·89 lines (72 loc) · 3.07 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
require_once locate_template('/lib/default.php');
require_once locate_template('/lib/themewrangler.class.php');
require_once locate_template('/lib/slug.php' );
require_once locate_template('/lib/cleanassnav.php' );
include_once locate_template('/lib/custom-post-types.php' );
include_once locate_template('/lib/woo-disablebilling.php' );
include_once locate_template('/lib/videoembed.php' );
include_once locate_template('/lib/woo-ajax.php' );
include_once locate_template('/lib/advanced-custom-fields-pro/acf.php' );
include_once locate_template('/lib/soil-master/soil.php' );
include_once locate_template('/lib/roots-rewrites-master/roots-rewrites.php' );
include_once locate_template('/lib/opengraph/opengraph.php' );
include_once locate_template('/lib/config.php' );
include_once locate_template('/lib/ajax.php' );
add_filter('acf/settings/path', 'my_acf_settings_path');
function my_acf_settings_path( $path ) {
$path = get_stylesheet_directory() . '/lib/advanced-custom-fields-pro/';
return $path;
}
add_filter('acf/settings/dir', 'my_acf_settings_dir');
function my_acf_settings_dir( $dir ) {
$dir = get_stylesheet_directory_uri() . '/lib/advanced-custom-fields-pro/';
return $dir;
}
add_theme_support('soil-relative-urls');
add_theme_support('soil-nice-search');
add_theme_support('soil-clean-up');
add_theme_support( 'woocommerce' );
add_filter( 'woocommerce_enqueue_styles', 'jk_dequeue_styles' );
function jk_dequeue_styles( $enqueue_styles ) {
unset( $enqueue_styles['woocommerce-general'] ); // Remove the gloss
unset( $enqueue_styles['woocommerce-layout'] ); // Remove the layout
unset( $enqueue_styles['woocommerce-smallscreen'] ); // Remove the smallscreen optimisation
return $enqueue_styles;
}
add_filter( 'woocommerce_enqueue_styles', '__return_false' );
$settings = array(
'available_scripts' => array(
'jquery-g' => array('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js','1.11.2'),
'scripts' => array('/assets/js/scripts.min.js'),
'plugins' => array('/assets/js/plugins.min.js'),
'jqueryui' => array('//ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js'),
'videojs' => array('//vjs.zencdn.net/4.3/video.js'),
),
'default_scripts' => array(
'jqueryui',
'videojs',
'plugins',
'scripts',
),
'available_stylesheets' => array(
'default' => array('/assets/css/styles.min.css'),
),
'default_stylesheets' => array(
'default'
),
'deregister_scripts' => array('jquery','l10n')
);
if(function_exists("acf_add_options_page")) {
acf_add_options_page();
}
if(function_exists("register_options_page")) {
//register_options_page('Site Options');
}
Themewrangler::set_defaults( $settings );
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
wp_deregister_script('jquery');
wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js", false, null);
wp_enqueue_script('jquery');
}