Skip to content

Commit 60a68db

Browse files
committed
fix: correct network condition check and streamline snippet fetching
1 parent f033f1d commit 60a68db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/php/class-list-table.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ protected function column_activate( Snippet $snippet ): string {
314314
'"></span>';
315315
}
316316

317-
if ( $this->is_network && ( ! $this->is_network && $snippet->network && ! $snippet->shared_network ) ) {
317+
if ( ! $this->is_network && $snippet->network && ! $snippet->shared_network ) {
318318
return '';
319319
}
320320

@@ -1061,8 +1061,7 @@ public function prepare_items() {
10611061
$this->process_requested_actions();
10621062
$snippets = array_fill_keys( $this->statuses, array() );
10631063

1064-
$all_snippets = apply_filters( 'code_snippets/list_table/get_snippets', get_snippets() );
1065-
$all_snippets = $this->fetch_shared_network_snippets( $all_snippets );
1064+
$all_snippets = apply_filters( 'code_snippets/list_table/get_snippets', $this->fetch_shared_network_snippets( get_snippets() ) );
10661065

10671066
// Separate trashed snippets from the main collection
10681067
$snippets['trashed'] = array_filter( $all_snippets, function( $snippet ) {

0 commit comments

Comments
 (0)