Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request weblab#17 from jmr06005/master
Removing widget from page builder
  • Loading branch information
jmr06005 committed Mar 3, 2016
2 parents 67d0f27 + 2714a6e commit 58118e9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions uc-people-widget.php
Expand Up @@ -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'
);
Expand Down Expand Up @@ -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);
}
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);

?>

0 comments on commit 58118e9

Please sign in to comment.