From 2714a6e5a08538d8d2ce7677b8812c9bd3c410ee Mon Sep 17 00:00:00 2001 From: Joshua Roy Date: Thu, 3 Mar 2016 14:13:15 -0500 Subject: [PATCH] Removing widget from page builder --- uc-people-widget.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/uc-people-widget.php b/uc-people-widget.php index 2f15f42..c0a0a84 100644 --- a/uc-people-widget.php +++ b/uc-people-widget.php @@ -217,13 +217,10 @@ Class UC_People_Widget extends WP_Widget { foreach( $settings as $k => $v ){ $settings[$k] = get_field( $k, 'widget_' . $args['widget_id'] ); } - + $wpQueryArgs = array( 'posts_per_page' => -1, 'post_type' => 'person', - //'orderby' => 'menu_order title', - //'order' => 'ASC', - //'order' => 'post__in', 'post__in' => ( ( !is_null($settings['specific_people']) ) ? $settings['specific_people'] : array() ), 'fields' => 'ids' ); @@ -292,9 +289,7 @@ Class UC_People_Widget extends WP_Widget { 'terms' => $value ); array_push($tax_query, $group_query); - /*if( $isGroupSet != false ){ - array_push($tax_query, $taxGroupArray); - }*/ + if( $isTagSet != false ){ array_push($tax_query, $taxTagArray); } @@ -333,4 +328,10 @@ function register_uc_people_widget(){ } add_action( 'widgets_init', 'register_uc_people_widget' ); +function remove_uc_people_from_sopanels( $widgets ){ + unset($widgets['UC_People_Widget']); + return $widgets; +} +add_filter( 'siteorigin_panels_widgets', 'remove_uc_people_from_sopanels', 11); + ?> \ No newline at end of file