-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
88 lines (57 loc) · 3.17 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
<?php
/**
* Uku child theme functions and definitions
*/
/*-----------------------------------------------------------------------------------*/
/* Include the parent theme style.css
/*-----------------------------------------------------------------------------------*/
/**
* Dequeue the Parent Theme styles.
* https://impress.org/removing-styles-scripts-from-your-wordpress-parent-theme/
* Hooked to the wp_enqueue_scripts action, with a late priority (100),
* so that it runs after the parent style was enqueued.
* wp_dequeue_style('additional-parent-style');
*/
function give_dequeue_plugin_css() {
wp_deregister_style('uku-serif-style');
wp_deregister_style('uku-woocommerce-style');
}
add_action('wp_enqueue_scripts','give_dequeue_plugin_css', 100);
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-uku-serif-style', get_stylesheet_directory_uri() . '/assets/css/serif-style.css' );
wp_enqueue_style( 'child-uku-woocommerce-style', get_stylesheet_directory_uri() . '/assets/css/woocommerce.css' );
}
/*-----------------------------------------------------------------------------------*/
/* Include the parent theme custom.js
/*-----------------------------------------------------------------------------------*/
function my_custom_scripts() {
wp_enqueue_script( 'custom-js', get_stylesheet_directory_uri() . '/assets/js/custom.js', array( 'jquery' ),'',true );
}
add_action( 'wp_enqueue_scripts', 'my_custom_scripts' );
/*-----------------------------------------------------------------------------------*/
/* Include helpers
/*-----------------------------------------------------------------------------------*/
// Last Login
require_once( get_stylesheet_directory() . '/helpers/gafi_users_last_login.php');
// Add Custom USER_META Fields (Wie wurden Sie auf uns aufmerksam) Account Form (https://foodnation.ch/mein-konto/edit-account/)
require_once( get_stylesheet_directory() . '/helpers/gafi_add_user_meta_fields_to_account_form.php');
// Add fields to Register Form
require_once( get_stylesheet_directory() . '/helpers/gafi_add_fields_to_register_form.php');
// Add fields to blling and shipping adress
require_once( get_stylesheet_directory() . '/helpers/gafi_add_fields_to_billing_and_shipping_address.php');
// Make Changes to shopping Cart Page
require_once( get_stylesheet_directory() . '/helpers/gafi_shopping_cart.php');
// Make Changes to Checkout Page
require_once( get_stylesheet_directory() . '/helpers/gafi_checkout.php');
// Chane WooComerce E-Mails
require_once( get_stylesheet_directory() . '/helpers/gafi_e-mail_customizer.php');
// Change/Add WordPress Customizer Settings
require_once( get_stylesheet_directory() . '/helpers/gafi_theme_customizer.php');
// Change SMTP Settings
require_once( get_stylesheet_directory() . '/helpers/gafi_smtp_e-mail.php');
// Loead More Button BETA
// require_once( get_stylesheet_directory() . '/helpers/gafi_loadmore.php');
// Update Coupon amount after use (BETA_VERSION)
// require_once( get_stylesheet_directory() . '/helpers/gafi_update_coupon_amount.php');