Skip to content

Commit

Permalink
Exclude pojo widgets from builder in productions evn only
Browse files Browse the repository at this point in the history
  • Loading branch information
KingYes committed Jun 1, 2016
1 parent c613f54 commit 631efad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions includes/widgets-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ private function _register_wp_widgets() {

foreach ( $wp_widget_factory->widgets as $widget_class => $widget_obj ) {
// Skip Pojo widgets
if ( $widget_obj instanceof \Pojo_Widget_Base )
continue;
if ( ! defined( 'WP_DEBUG' ) ) {
if ( $widget_obj instanceof \Pojo_Widget_Base ) {
continue;
}
}

$this->register_widget( __NAMESPACE__ . '\Widget_WordPress', [ 'widget_name' => $widget_class ] );
}
Expand Down

0 comments on commit 631efad

Please sign in to comment.