From c7e9472ddea82211a45363757b503ae9babb1cb7 Mon Sep 17 00:00:00 2001 From: Dzikri Aziz Date: Thu, 20 Feb 2014 04:49:10 +0700 Subject: [PATCH] Fix active connectors checking on post list table --- includes/list-table.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/list-table.php b/includes/list-table.php index 796b0545d..8beee1ae0 100644 --- a/includes/list-table.php +++ b/includes/list-table.php @@ -147,11 +147,11 @@ function get_records() { $hide_disabled_connectors_records = apply_filters( 'wp_stream_list_table_hide_disabled_connectors_records', true ); if ( true === $hide_disabled_connectors_records ) { - $args['connector__in'] = wp_list_filter( - WP_Stream_Settings::$options['connectors_active_connectors'], - array( '__placeholder__' ), - 'NOT' - ); + $active_connectors = WP_Stream_Settings::$options['connectors_active_connectors']; + if ( is_callable( $active_connectors ) ) { + $active_connectors = call_user_func( $active_connectors ); + } + $args['connector__in'] = wp_list_filter( $active_connectors, array( '__placeholder__' ), 'NOT' ); } }