diff --git a/languages/pressbooks-multi-institution.pot b/languages/pressbooks-multi-institution.pot index f2544efc..7387fd22 100644 --- a/languages/pressbooks-multi-institution.pot +++ b/languages/pressbooks-multi-institution.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-12-18T01:26:07+00:00\n" +"POT-Creation-Date: 2024-12-18T01:54:13+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: pressbooks-multi-institution\n" diff --git a/src/Services/PermissionsManager.php b/src/Services/PermissionsManager.php index 503b5d0e..6885ce6e 100644 --- a/src/Services/PermissionsManager.php +++ b/src/Services/PermissionsManager.php @@ -42,13 +42,13 @@ public function setupFilters(): void do_action('pb_institutional_filters_created', $institution, $institutionalManagers, $institutionalUsers); - // Hide the edit link on the front end for institutional managers + // Hide the edit link on root site pages for institutional managers add_filter('edit_post_link', function ($link) use ($institution) { - // If the user is a regular super admin, return the link - if ($institution === 0) { - return $link; - } - return ''; + $currentBlogId = get_current_blog_id(); + if ($currentBlogId === 1 && $institution !== 0) { + return ''; + } + else return $link; }); }