Skip to content
This repository has been archived by the owner. It is now read-only.

Removing widget from page builder #17

Merged
merged 1 commit into from
Mar 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions uc-people-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,10 @@ public function widget( $args, $instance ){
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'
);
Expand Down Expand Up @@ -292,9 +289,7 @@ public function widget( $args, $instance ){
'terms' => $value
);
array_push($tax_query, $group_query);
/*if( $isGroupSet != false ){
array_push($tax_query, $taxGroupArray);
}*/

if( $isTagSet != false ){
array_push($tax_query, $taxTagArray);
}
Expand Down Expand Up @@ -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);

?>