-
Notifications
You must be signed in to change notification settings - Fork 2
/
functions.php
145 lines (118 loc) · 2.84 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
/**
* Author: Annrie
* URL: https://phantomoon.com
*
* Phantomoon functions and definitions
*
* Set up the theme and provides some helper functions, which are used in the
* theme as custom template tags. Others are attached to action and filter
* hooks in WordPress to change core functionality.
*
* @link https://codex.wordpress.org/Theme_Development
* @package FoundationPressNG
* @since FoundationPressNG 1.0.0
*/
/**
* Various clean up functions
*/
require_once 'library/cleanup.php';
/**
* Required for Foundation to work properly
*/
require_once 'library/foundation.php';
/**
* Format comments
*/
require_once 'library/class-foundationpress-comments.php';
/**
* Register all navigation menus
*/
require_once 'library/navigation.php';
/**
* Add menu walkers for top-bar and off-canvas
*/
require_once 'library/class-foundationpress-top-bar-walker.php';
require_once 'library/class-foundationpress-mobile-walker.php';
/**
* Create widget areas in sidebar and footer
*/
require_once 'library/widget-areas.php';
/**
* Return entry meta information for posts
*/
require_once 'library/entry-meta.php';
/**
* Enqueue scripts
*/
require_once 'library/enqueue-scripts.php';
/**
* Add theme support
*/
require_once 'library/theme-support.php';
/**
* Add Nav Options to Customer
*/
require_once 'library/custom-nav.php';
/**
* Change WP's sticky post class
*/
require_once 'library/sticky-posts.php';
/**
* Configure responsive image sizes
*/
require_once 'library/responsive-images.php';
/**
* Gutenberg editor support
*/
require_once 'library/gutenberg.php';
/**
* If your site requires protocol relative url's for theme assets, uncomment the line below
*/
require_once 'library/class-foundationpress-protocol-relative-theme-assets.php';
/**
* Override WooCommerce image sizes
*/
require_once 'library/woocommerce-image-sizes.php';
/**
* Declare WooCommerce support
*/
require_once 'library/woocommerce-support.php';
/**
* TinyMCE style changes
*/
require_once 'library/tinymce-styles.php';
/**
* Add ACF options pages
*/
require_once 'library/acf-options.php';
/**
* Attachment functions
*/
require_once 'library/attachment-functions.php';
/**
* Convert string to slug
*/
require_once 'library/string-to-slug.php';
/**
* Format phone numbers
*/
require_once 'library/phone-format.php';
/**
* Remove type= from <script> and <style>
*/
require_once 'library/remove-type.php';
/**
* Add REST_API
*/
// require_once 'library/rest-api.php';
// require_once 'library/extra-function.php';
if ( ! isset( $content_width ) ) {
$content_width = 1200;
}
// deactivate new block editor
// https://wordpress.org/support/topic/error-in-widgets-with-new-wordpress-version-5-8-wp_enqueue_script-and-wp/
function pm_theme_support() {
remove_theme_support( 'widgets-block-editor' );
}
add_action( 'after_setup_theme', 'pm_theme_support' );