Skip to content

Commit

Permalink
revert change to the removed code
Browse files Browse the repository at this point in the history
  • Loading branch information
mehul0810 committed Jun 28, 2024
1 parent 5a11779 commit 75a23d7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion includes/classes/PullListTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,17 @@ public function prepare_items() {

$per_page = $this->get_items_per_page( 'pull_posts_per_page', get_option( 'posts_per_page' ) );
$current_page = $this->get_pagenum();
$post_type = ! empty( $connection_now->pull_post_type ) ? $connection_now->pull_post_type : array( 'post', 'page' );

// Support 'View all' filtering for internal connections.
if ( is_a( $connection_now, '\Distributor\InternalConnections\NetworkSiteConnection' ) ) {
if ( empty( $connection_now->pull_post_type ) || 'all' === $connection_now->pull_post_type ) {
$post_type = wp_list_pluck( $connection_now->pull_post_types, 'slug' );
} else {
$post_type = $connection_now->pull_post_type;
}
} else {
$post_type = ! empty( $connection_now->pull_post_type ) ? $connection_now->pull_post_type : array( 'post', 'page' );
}

$remote_get_args = [
'posts_per_page' => $per_page,
Expand Down

0 comments on commit 75a23d7

Please sign in to comment.