Skip to content

Instantly share code, notes, and snippets.

@zorca
Last active April 14, 2020 07:04
Show Gist options
  • Select an option

  • Save zorca/e34bc8bb43950826deeb5af217446d7c to your computer and use it in GitHub Desktop.

Select an option

Save zorca/e34bc8bb43950826deeb5af217446d7c to your computer and use it in GitHub Desktop.
<?php
global $elementor_widget_blacklist;
$elementor_widget_blacklist = [
// 'common'
// ,'heading'
// ,'image'
// ,'text-editor'
// ,'video'
// ,'button'
// ,'divider'
// ,'spacer'
// ,'image-box'
'google-maps'
// ,'icon'
// ,'icon-box'
// ,'image-gallery'
// ,'image-carousel'
// ,'icon-list'
// ,'counter'
// ,'progress'
// ,'testimonial'
// ,'tabs'
// ,'accordion'
// ,'toggle'
// ,'social-icons'
// ,'alert'
// ,'audio'
// ,'shortcode'
// ,'html'
// ,'menu-anchor'
// ,'sidebar'
//
// pro ----------------- //
// ,'posts'
// ,'portfolio'
// ,'slides'
// ,'form'
// ,'login'
// ,'media-carousel'
// ,'testimonial-carousel'
// ,'nav-menu'
// ,'pricing'
// ,'facebook-comment'
// ,'nav-menu'
// ,'animated-headline'
// ,'price-list'
// ,'price-table'
// ,'facebook-button'
// ,'facebook-comments'
// ,'facebook-embed'
// ,'facebook-page'
// ,'add-to-cart'
// ,'categories'
// ,'elements'
// ,'products'
// ,'flip-box'
// ,'carousel'
// ,'countdown'
// ,'share-buttons'
// ,'author-box'
// ,'breadcrumbs'
// ,'search-form'
// ,'post-navigation'
// ,'post-comments'
// ,'theme-elements'
// ,'blockquote'
// ,'template'
// ,'wp-widget-audio'
// ,'woocommerce'
// ,'social'
// ,'library'
// wp widgets ----------------- //
// ,'wp-widget-pages'
// ,'wp-widget-archives'
// ,'wp-widget-media_audio'
// ,'wp-widget-media_image'
// ,'wp-widget-media_gallery'
// ,'wp-widget-media_video'
// ,'wp-widget-meta'
// ,'wp-widget-search'
// ,'wp-widget-text'
// ,'wp-widget-categories'
// ,'wp-widget-recent-posts'
// ,'wp-widget-recent-comments'
// ,'wp-widget-rss'
// ,'wp-widget-tag_cloud'
// ,'wp-widget-nav_menu'
// ,'wp-widget-custom_html'
// ,'wp-widget-polylang'
// ,'wp-widget-calendar'
// ,'wp-widget-elementor-library'
];
add_action('elementor/widgets/widgets_registered', function($widgets_manager){
global $elementor_widget_blacklist;
foreach($elementor_widget_blacklist as $widget_name){
$widgets_manager->unregister_widget_type($widget_name);
}
}, 15);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment