diff --git a/CHANGELOG.md b/CHANGELOG.md index 73edd599..8f59a473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [0.1.65](https://github.com/CodingBlackFemales/wordpress/compare/v0.1.64...v0.1.65) (2026-10-27) + +### Features + +* **academy:** show the front-end toolbar to content staff ([3e88372](https://github.com/CodingBlackFemales/wordpress/commit/3e883729afbd70b141bd62bf69280b443c09762f)) + +### Bug Fixes + +* **academy:** read editorial comments on unpublished posts ([8ca1a9e](https://github.com/CodingBlackFemales/wordpress/commit/8ca1a9eead4d2662b35696ee906d15dc9ce2c1ae)) + ## [0.1.64](https://github.com/CodingBlackFemales/wordpress/compare/v0.1.63...v0.1.64) (2026-10-21) ### Bug Fixes diff --git a/package-lock.json b/package-lock.json index f958985c..8943b241 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cbf-wordpress", - "version": "0.1.64", + "version": "0.1.65", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cbf-wordpress", - "version": "0.1.64", + "version": "0.1.65", "devDependencies": { "@commitlint/cli": "^19.0", "@commitlint/config-conventional": "^19.0", diff --git a/package.json b/package.json index ae48815e..1d856b0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cbf-wordpress", - "version": "0.1.64", + "version": "0.1.65", "description": "[![Packagist](https://img.shields.io/packagist/v/roots/bedrock.svg?style=flat-square)](https://packagist.org/packages/roots/bedrock) [![Build Status](https://img.shields.io/travis/roots/bedrock.svg?style=flat-square)](https://travis-ci.org/roots/bedrock)", "devDependencies": { "@commitlint/cli": "^19.0", diff --git a/web/app/mu-plugins/cbf-content-board-revision-needs-work.php b/web/app/mu-plugins/cbf-content-board-revision-needs-work.php new file mode 100644 index 00000000..bff8fff3 --- /dev/null +++ b/web/app/mu-plugins/cbf-content-board-revision-needs-work.php @@ -0,0 +1,39 @@ + $status ) { + if ( is_object( $status ) && ( $status->slug ?? '' ) === 'revision-needs-work' && ! empty( $status->alternate ) ) { + $statuses[ $key ] = clone $status; + $statuses[ $key ]->alternate = false; + } + } + + return $statuses; + }, + 20 +); diff --git a/web/app/mu-plugins/cbf-staff-synced-patterns.php b/web/app/mu-plugins/cbf-staff-synced-patterns.php new file mode 100644 index 00000000..213957ea --- /dev/null +++ b/web/app/mu-plugins/cbf-staff-synced-patterns.php @@ -0,0 +1,71 @@ +post_type !== 'wp_block' || $post->post_status !== 'publish' ) { + return $caps; + } + + return array( 'edit_courses' ); + }, + 10, + 4 +); + +add_filter( + 'rest_request_before_callbacks', + static function ( $response, $handler, WP_REST_Request $request ) { + if ( + $request->get_method() !== 'GET' + || $request['context'] !== 'edit' + || ! preg_match( '#^/wp/v2/blocks(?:/\d+)?$#', $request->get_route() ) + || ! cbf_staff_synced_patterns_applies( get_current_user_id() ) + ) { + return $response; + } + + $request->set_param( 'context', 'view' ); + + return $response; + }, + 10, + 3 +);