Skip to content

Instantly share code, notes, and snippets.

@selul
Last active September 13, 2021 07:25
Show Gist options
  • Save selul/1f5bd50971a210d42447389022ef4d43 to your computer and use it in GitHub Desktop.
Save selul/1f5bd50971a210d42447389022ef4d43 to your computer and use it in GitHub Desktop.
Plugin that removes Neve block patterns
<?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