Last active
January 16, 2025 18:12
-
-
Save audrasjb/a43503cf0c9a8c08de70874b6a9a76df to your computer and use it in GitHub Desktop.
Revisions
-
audrasjb renamed this gist
Jan 16, 2025 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
audrasjb created this gist
Jan 16, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ <?php /** * Plugin Name: Remove default theme patterns. * Author: Jb Audras * Version: 0.1 * Author URI: https://whodunit.fr */ /** * Unregisters default patterns from TT5. */ function jba_unregister_tt5_patterns() { /** * Add the patterns you want to unregister. * Structure: {theme_slug}/{pattern_file} */ $block_patterns = array( 'twentytwentyfive/banner-about-book', 'twentytwentyfive/banner-cover-big-heading' ); foreach ( $block_patterns as $block_pattern ) { unregister_block_pattern( $block_pattern ); } } add_filter( 'init', 'jba_unregister_tt5_patterns' );