-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
44 lines (30 loc) · 1.26 KB
/
Copy pathfunctions.php
File metadata and controls
44 lines (30 loc) · 1.26 KB
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
<?php
// Header block
require_once 'acf-blocks/header/block.php';
// Image and text block
require_once 'acf-blocks/image-and-text-section-auto/block.php';
require_once 'acf-blocks/image-and-text-section-advanced/block.php';
// Features block
require_once 'acf-blocks/features/block.php';
// Enqueue stylesheet.
function enqueue_stylesheet() {
wp_enqueue_style( 'acf-sample', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );
wp_enqueue_style( 'acf-sample-fontawesome', get_stylesheet_directory_uri() . '/assets/css/fontawesome-all.min.css', array(), wp_get_theme()->get( 'Version' ) );
}
add_action( 'wp_enqueue_scripts', 'enqueue_stylesheet' );
function theme_setup() {
add_theme_support( 'editor-styles' );
// Enqueue editor stylesheet.
add_editor_style( 'style.css' );
add_editor_style( 'assets/css/fontawesome-all.min.css' );
// add_editor_style( array( 'editor-style.css' ) );
// Remove core block patterns.
remove_theme_support( 'core-block-patterns' );
}
add_action( 'after_setup_theme', 'theme_setup' );
add_action( 'enqueue_block_editor_assets', function() {
wp_dequeue_style( 'wp-block-library-classic-theme' );
}, 100 );
add_action( 'enqueue_block_editor_assets', function() {
wp_dequeue_style( 'wp-block-library-classic' );
}, 20 );