Advertisement
ghenzdeveloper

Remove photos from group tab

Dec 6th, 2024 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. add_filter('peepso_group_segment_menu_links', function($links){
  2.  
  3.     if (isset($links[20][0]) && $links[20][0]['href'] === 'photos') {
  4.         unset($links[20][0]); // Unset the photos entry  
  5.     }
  6.  
  7.     if (isset($links[30][0]) && $links[30][0]['href'] === 'media') {
  8.         unset($links[30][0]); // Unset the video entry  
  9.     }
  10.  
  11.     if (isset($links[0][2]) && $links[0][2]['href'] === 'members') {
  12.         unset($links[0][2]); // Unset the member entry for owners
  13.     }
  14.  
  15.     if (isset($links[0][1]) && $links[0][1]['href'] === 'members') {
  16.         unset($links[0][1]); // Unset the member entry for members
  17.     }
  18.  
  19.     return $links;
  20. }, 99);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement