Prechádzať zdrojové kódy

Unregister Jetpack form patterns on atomic sites (#7634)

Miguel San Segundo 1 rok pred
rodič
commit
568180b89f
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  1. 5 0
      assembler/functions.php

+ 5 - 0
assembler/functions.php

@@ -57,7 +57,12 @@ if ( ! function_exists( 'assembler_setup' ) ) :
 		// Enqueue editor styles.
 		add_editor_style( 'style.css' );
 		// Unregister Jetpack form patterns and core patterns bundled in WordPress.
+		// Simple sites
 		assembler_unregister_patterns();
+		add_filter( 'wp_loaded', function () {
+			// Atomic sites
+			assembler_unregister_patterns();
+		} );
 		// Remove theme support for the core and featured patterns coming from the Dotorg pattern directory.
 		remove_theme_support( 'core-block-patterns' );
 	}