Last active
September 13, 2021 07:25
-
-
Save selul/1f5bd50971a210d42447389022ef4d43 to your computer and use it in GitHub Desktop.
Plugin that removes Neve block patterns
This file contains 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 characters
<?php | |
/* | |
Plugin Name: Remove Neve block patterns | |
Description: Plugin that removes Neve block patterns | |
Author: Themeisle | |
Version: 0.0.1 | |
*/ | |
add_action( 'admin_init', function () { | |
foreach ( WP_Block_Patterns_Registry::get_instance()->get_all_registered() as $pattern ) { | |
if ( strpos( $pattern['name'], 'neve/' ) !== false ) { | |
unregister_block_pattern( $pattern['name'] ); | |
} | |
} | |
}, 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment