Skip to content

Commit

Permalink
Remove (de)activate link for shared network snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
sheabunge committed Jun 25, 2015
1 parent 36f2268 commit 40c4288
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/class-list-table.php
Expand Up @@ -160,6 +160,15 @@ private function get_snippet_action_links( Snippet $snippet ) {
) )
);

/* Remove (de)activate link for shared network snippets */
if ( $snippet->network ) {
$shared_network_snippets = get_site_option( 'shared_network_snippets', array() );

if ( in_array( $snippet->id, $shared_network_snippets ) ) {
unset( $actions['activate'], $actions['deactivate'] );
}
}

return $actions;
}

Expand Down

0 comments on commit 40c4288

Please sign in to comment.