We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 63c6a56 + 706f4fc commit 6a0d462Copy full SHA for 6a0d462
inc/hooks/restrict-block-patterns.php
@@ -0,0 +1,21 @@
1
+<?php
2
+/**
3
+ * Restrict block patterns to theme-specific patterns only.
4
+ *
5
+ * @package wdsbt
6
+ */
7
+
8
+namespace WebDevStudios\wdsbt;
9
10
11
+ * Restrict patterns from the Dotcom library by overriding the patterns source site.
12
13
+ * @return string The string to disable the Dotcom patterns source.
14
15
+function restrict_block_editor_patterns() {
16
+ return 'disable-dotcom-patterns-source';
17
+}
18
+add_filter( 'a8c_override_patterns_source_site', __NAMESPACE__ . '\restrict_block_editor_patterns' );
19
20
+// Disable the loading of remote patterns from the Dotorg pattern directory.
21
+add_filter( 'should_load_remote_block_patterns', '__return_false' );
0 commit comments