-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathfunctions.php
More file actions
36 lines (32 loc) · 985 Bytes
/
functions.php
File metadata and controls
36 lines (32 loc) · 985 Bytes
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
<?php
/**
* Divi child theme.
*
* @see https://www.elegantthemes.com/blog/divi-resources/divi-child-theme
*/
// Set API key
// Elegant Themes API call: core/components/Updates.php:573
// wp option update et_automatic_updates_options '{"username":"USERNAME","api_key":"API-KEY"}' --format=json
// The Blog Posts Index page / home.php / `page_for_posts` cannot be a Divi page
// https://help.elegantthemes.com/en/articles/2188833-blog-page-not-changing-when-built-with-divi-builder
add_filter(
'pre_option_page_for_posts',
'__return_zero',
PHP_INT_MAX,
0
);
// Disable updates
add_action(
'admin_init',
static function () {
remove_action('admin_init', 'et_register_updates_component', 9);
},
// After et_register_updates_component
10,
0
);
function prefix_theme_enqueue_styles()
{
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
}
add_action('wp_enqueue_scripts', 'prefix_theme_enqueue_styles');