From 20e1a2b960aac28ab233045e26ad45ab4dfb792f Mon Sep 17 00:00:00 2001 From: pressbooks-ops <66340483+pressbooks-ops@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:16:41 +0800 Subject: [PATCH 1/2] chore(dev): release 1.2.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ README.md | 2 +- pressbooks-multi-institution.php | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5fdd8830..c3f14639 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.1.0" + ".": "1.2.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c5a0483..7244e694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.2.0](https://github.com/pressbooks/pressbooks-multi-institution/compare/1.1.0...1.2.0) (2024-12-18) + + +### Features + +* hook to fetch institution id for a given user ([021e8ee](https://github.com/pressbooks/pressbooks-multi-institution/commit/021e8ee81aa23e61a50f1f317b520d5ddef35a03)) + + +### Bug Fixes + +* only hide edit link on root site pages ([#220](https://github.com/pressbooks/pressbooks-multi-institution/issues/220)) ([4677227](https://github.com/pressbooks/pressbooks-multi-institution/commit/46772276398a92709f2a6e6c2ed9d498b37d50ae)) +* update permissions for institutional managers ([#219](https://github.com/pressbooks/pressbooks-multi-institution/issues/219)) ([7159fd6](https://github.com/pressbooks/pressbooks-multi-institution/commit/7159fd60013fefb077a427a7c3a8d3550be658a2)) + ## [1.1.0](https://github.com/pressbooks/pressbooks-multi-institution/compare/1.0.5...1.1.0) (2024-11-28) diff --git a/README.md b/README.md index aeb364c1..4dc0f001 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Requires at least:** 6.4.3 \ **Tested up to:** 6.4.3 \ -**Stable tag:** 1.1.0 \ +**Stable tag:** 1.2.0 \ **License:** GPLv3 or later \ **License URI:** https://www.gnu.org/licenses/gpl-3.0.html diff --git a/pressbooks-multi-institution.php b/pressbooks-multi-institution.php index f1fd2c03..712e4e6e 100644 --- a/pressbooks-multi-institution.php +++ b/pressbooks-multi-institution.php @@ -7,7 +7,7 @@ * Requires Plugins: pressbooks * Description: Tools for managing Pressbooks networks shared by multiple institutions * x-release-please-start-version - * Version: 1.1.0 + * Version: 1.2.0 * x-release-please-end * Author: Pressbooks (Book Oven Inc.) * Author URI: https://pressbooks.org From 75cc70920a4b4c98e26e5799a426a2756fdba3c2 Mon Sep 17 00:00:00 2001 From: Oscar Arzola Date: Wed, 18 Dec 2024 16:26:50 -0500 Subject: [PATCH 2/2] lint --- src/Services/PermissionsManager.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Services/PermissionsManager.php b/src/Services/PermissionsManager.php index 6885ce6e..68399271 100644 --- a/src/Services/PermissionsManager.php +++ b/src/Services/PermissionsManager.php @@ -46,9 +46,10 @@ public function setupFilters(): void add_filter('edit_post_link', function ($link) use ($institution) { $currentBlogId = get_current_blog_id(); if ($currentBlogId === 1 && $institution !== 0) { - return ''; - } - else return $link; + return ''; + } else { + return $link; + } }); }