-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
92 lines (58 loc) · 2.48 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
90
91
92
<?php
/**
* Theme functions and definitions
*
* @package ThriveThemeChild
*/
/**
* Load child theme css and optional scripts
*
* @return void
*/
require_once 'inc/extras.php';
require_once 'templates/shortcode/feed-archieve.php';
require_once 'templates/shortcode/single-hot-tubs.php';
require_once 'templates/shortcode/single-swim-spas.php';
require_once 'templates/shortcode/single-customer-gallery.php';
require_once 'templates/shortcode/collection.php';
require_once 'templates/shortcode/blog.php';
require_once 'templates/shortcode/user-account.php';
// require_once 'templates/shortcode/career-sub-page.php';
require_once 'templates/shortcode/service.php';
require_once 'templates/shortcode/perfect-hottub.php';
/** pages */
require_once 'templates/pages/brand.php';
require_once 'templates/pages/about.php';
require_once 'templates/pages/specials.php';
require_once 'templates/pages/locations.php';
require_once 'templates/pages/blog-feed.php';
require_once 'templates/pages/news-waves.php';
require_once 'templates/pages/contact.php';
require_once 'templates/pages/estore.php';
require_once 'templates/pages/resources/financing.php';
/** plugins */
function thrive_theme_child_enqueue_scripts() {
wp_enqueue_style('olympic-child-style', get_stylesheet_directory_uri() . '/assets/css/style.css', null, '1.0.0');
wp_enqueue_script( 'jquery-validator', 'https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js', array( 'jquery' ), '1.16.0', true );
wp_enqueue_script('olympic-child-script', get_stylesheet_directory_uri() . '/assets/js/main.js', null, '1.0.1');
remove_post_type_support('page', 'editor');
}
function enqueue_react_scripts() {
wp_enqueue_script('design-hottub', get_stylesheet_directory_uri() . '/extra/build/static/js/main.js', array(), '1.0', true);
wp_enqueue_style('design-hottub', get_stylesheet_directory_uri() . '/extra/build/static/css/main.css', array(), '1.0');
}
add_action('wp_enqueue_scripts', 'enqueue_react_scripts');
// add_action( 'woocommerce_single_product_summary', 'single_product_syndified', 15 );
add_action('wp_enqueue_scripts', 'thrive_theme_child_enqueue_scripts', 10);
function olympic_remove_feed($feedname) {
global $wp_rewrite;
if (in_array($feedname, $wp_rewrite->feeds)) {
$wp_rewrite->feeds = array_diff($wp_rewrite->feeds, array($feedname));
}
$hook = 'do_feed_' . $feedname;
// Remove default function hook
remove_all_actions($hook);
add_action($hook, $hook);
return $hook;
}
olympic_remove_feed('feed');